Cyber Security is a major concern to legitimate businesses around the world. It is also the largest growing illegitimate business. What are the 2 to main attack vectors on the technical side discussed in class? What is the 1 main vector for attack on the social engineering side? Explain how IT managers can best thwart attacks. What is a good business approach to creating a solid defense strategy? Explain the elements.
Please explain thoroughly wit at least 500 words. do not copy paste answers from the web too i can. do that as well. Thank you very much.
In: Computer Science
Module 2 Programming Assignment – Battleship Refactor
Refactor your Battleship drawing code from Module 1.
Download the OO template for the basic battleship game, BattleshipRefactor.zip (refer below)
The template has the outline of a battleship game using OO constructs. You need to add the Grid class and complete the code so that it runs correctly.
At a minimum, you need to complete the Draw and DropBomb methods with code similar to the previous assignment. There will be changes due to the different layout, but the core of your code will do the same thing.
In this Module we are adding 2 new features:
You may add as many other methods, fields or properties as you feel are required for the assignment.
Notes:
The code will be tested with grids ranging in size from 5 (the smallest you can fit a size 5 ship) upwards. Make sure that all aspects of the game work correctly without crashing or hanging.
You must use the template code provided!
Like in Module 1, please make sure you show the ships in the grid. At this point we are merely testing our game logic and hidden ships make the game very hard to test.
BattleShipGame.cs
using System;
namespace BattleshipSimple
{
internal class BattleShipGame
{
private Grid grid;
public BattleShipGame(int gridSize)
{
grid = new Grid(gridSize);
}
internal void Reset()
{
grid.Reset();
}
internal void Play()
{
while (grid.HasShipsLeft)
{
grid.Draw();
//Read input from user into x, y
int x, y;
grid.DropBomb(x, y);
}
}
}
}
Program.cs
using System;
namespace BattleshipSimple
{
class Program
{
static void Main(string[] args)
{
var game = new BattleShipGame(10);
ConsoleKeyInfo response;
do
{
game.Reset();
game.Play();
Console.WriteLine("Do you want to play again (y/n)");
response = Console.ReadKey();
} while (response.Key == ConsoleKey.Y);
}
}
}
In: Computer Science
Write code in MIPS ,read tow number from the user that do the following:
1- multiply
2- Dividing
3- sum
4- average
5- minimum
6- maximum
7- print message to thank the user for using my program
In: Computer Science
This is all in Python. Also, the names come from a .txt file that i have created with 3 names on it(Jim,Pam,Dwight).
Main Function. Write a program where the user enters a name. Using the read function, check to see if the name is in the text document. If it is, respond back to the user the name is found within the list.
Read Function. The read function should return the contents of the text document as a list.
EXAMPLE OUTPUT
Please enter a name: Jim
Jimis found in the list.
Enter another name (Y/N): Y
Please enter a name: Andy
Sorry, Andy was not found in the list. Would you like to add it?
(Y/N): Y
Andrew has been added to the list.
Enter another name (Y/N): N
Write Function. The write function should take the list and override the file with the new names list in reverse alphabetical order with a hard return after each name.
In: Computer Science
IN JAVA: Write a simple program that takes 5 inputs from the user and save them into a Text File. The inputs are Student Name, Student Address and student Date of Birth. Also write a simple program that reads and display the input from the first program text file.
In: Computer Science
public class ProductThread {
static class ProductThreads extends Thread{
private int begin, end;
int[] v1, v2;
long ris;
public ProductThreads(String name, int [] v1, int [] v2, int begin, int end) {
setName(name);
this.v1 = v1;
this.v2 = v2;
this.begin = begin;
this.end = end;
this.ris = 0;
}
public void run() {
System.out.println("Thread " + Thread.currentThread().getName() + "[" + begin + "," + end + "] started");
ris = 1;
for(int i = begin; i <= end; i++)
ris *= v1[i] * v2[i];
System.out.println("Thread " + Thread.currentThread().getName() + "[" + begin + "," + end + "] completed");
}//run
public long getResult() {
return ris;
}
}//ProductThread
public static void main(String[] args) throws InterruptedException {
int [] a = {1,2,3,4,5,6,7,8,9,10};
int [] b = {1,2,3,4,5,6,7,8,9,19};
System.out.print("A = " );
print(a);
System.out.print("B = " );
print(b);
System.out.println();
//create threads
ProductThreads t0 = new ProductThreads("T0", a, b, 0, 2);
ProductThreads t1 = new ProductThreads("T1", a, b, 3, 5);
ProductThreads t2 = new ProductThreads("T1", a, b, 6, 9);
//start threads
t0.start();
t1.start();
t2.start();
//wait for completion of threads
t0.join();
t1.join();
t2.join();
//computation of final result
long result = 1;
System.out.println("T0 result= " + t0.getResult());
System.out.println("T1 result= " + t1.getResult());
System.out.println("T2 result= " + t2.getResult());
result *= t0.getResult() * t1.getResult() * t2.getResult();
System.out.println();
//final statement to be printed
System.out.println("Final Results = " + t0.getResult() + " * " + t1.getResult() + " * " + t2.getResult() + "= " + result);
}
static void print(int[] v) {
System.out.print("[");
for (int i = 0; i < v.length; i++) {
System.out.print(v[i] + " ");
System.out.println("]");
}
}
}
Using the same type of multithreading, I need to create a simple program that generates the factorial of a number, but splits up the calculation in multiple threads.
For instance, 5! = 5 * 4 * 3 * 2 * 1 so the threads would split the calculation up. Ex: T1 = 5 * 4 * 3 + T2 = 2 * 1
In: Computer Science
III. Answer part A,B, and C. (in JAVA)
3a)
Return the number of times the letter 'a' occurs in a String.
countA("abc") → 1
countA("wxyz") → 0
countA("bcaca") → 2
3b)
Return the number of times the given letter ch occurs in the given String str.
countNumChar("abc", "a") → 1
countNumChar("wxyz", "b") → 0
countNumChar("bcaca", "c") → 2
3c)
Count the number of characters that are either a or b in a String. Try to use only one for loop.
countAorB("abc") → 2
countAorB("xyz") → 0
countAorB("ab") → 2
In: Computer Science
Write a script named numberlines.py. This script creates a program listing from a source program.
This script should:
1> This is the first line of text.
In: Computer Science
2. Create a java program that reads a file line by line and extract the first word.
The program will ask for the name of input and output file.
Input file: words.txt
today tomorrow
sam peterson
peter small
roy pratt
Output file: outwords.txt
tomorrow
peterson
small
pratt
In: Computer Science
write a script in ruby to automate user account creation in Linux using a CSV file. Username is a combination of first initial last initial of the first name and last name in the last name followed by the first initial last initial(Ex. Sam Smith = smithsm). If two or more employees had the same first and last name appends a number to the end of the username. After accounts are created write the first and last names along with their username to a CSV file
CSV Example:
first_name last_name
Bob Key
Jeff Scolding
Peter Van't Blob
Sam Smith
Sam Smith
In: Computer Science
design a divide & conquer alogrithm that requires 2 recursive calls for array size greater than 2. the algorithm should receive an array of ints and output the product of the array. provide the reccurence equation and the big-oh analysis/tightest bound. and show the run-time if input to the algorithm passed the entire original array into the recursive call
In: Computer Science
Write a C++ program that will output the multiplication table as show below:
1*1=1 2*1=2 3*1=3 …… 9*1=1
1+2=2 2*2=4 3*2=6 …… 9*2=18
……. ……. ……. …… …….
1*9=9 2*8=18 3*9=27 …… 9*9=81
In: Computer Science
Hi there, I have needed a big report about "Personal Portfolio Website" Which is included (HTML, CSS, JavaScript). You have to write briefly about HTML, CSS, JAVASCRIPT And Portfolio Website.
Please try to write at least 5000 (Five Thousand) words.
Thanks in Advanced.
In: Computer Science
IN PYTHON ( Use Fuctions and or with Loop if comfortable)
Your friends just bought a new five room house and need your help to know how much it will cost to re-do the floors. Write a program that, given the dimensions of each of the five rooms and the desired type of flooring, outputs the cost of each room as well as the total cost. Hardwood costs $1.39/sqft, carpet costs $3.99/sqft, and tile costs $4.99/sqft. Input Validation: Your program must work regardless of the case the floor option is typed in and any blank spaces surrounding it; If an invalid option is given, inform the user it was invalid and that you will be skipping that room (treat the cost as zero). Round: Use the round function to round your output to two decimal places.
In: Computer Science
UNIX ONLY
Write a bash script that will accept a filename as a command line argument. Your script should first check whether the filename has been passed as argument or not (hint: at least one argument has to be provided). If no argument has been provided your script should display appropriate message and exit. If a file name has been provided, your script should check if the file exists in the current directory and display the contents of the file. Otherwise if the file does not exist it should display an appropriate error message
WHAT WOULD THIS LOOK LIKE IN TERMINAL?
In: Computer Science