(Please use some in text citations and references or works cited please. If you have answered the question before please use a new answer thanks.
a. Search the web for various commercial encryption algorithms. b. Find one that you feel may be “snake oil”. c. Write a report explaining the encryption algorithm and your opinion *in-text citations and references are required *written in at least 2~3 paragraphs
In: Computer Science
Design and write a Corporate Code of Ethics for a professional computing/IT company. Your COE should be relative and detailed enough for your company of choice.
You will need to write up to (but not more than) three lines about your company of choice. Your company can be your future company that you will establish, or it can be an existing company. If it is an existing company it MUST NOT already have a published code of ethics/conduct on its website.
. Your answer should not be less than 1/3 of a page but should not exceed one full page.
In: Computer Science
JAVA
Add static methods largest and smallest to the Measurable interface. The methods should return the object with the largest or smallest measure from an array of Measurable objects.
In: Computer Science
6) c programming Case study: In a certain building at a top secret research lab, some yttrium-90 has leaked into the computer analysts’ coffee room. The leak would currently expose personnel to 150 millirems of radiation a day. The half-life of the substance is about three days, that is, the radiation level is only half of what is was three days ago. The analysts want to know how long it will be before the radiation is sown to a safe level of 0.466 millirem a day. They would like a chart that displays the radiation level for every there days with message unsafe or sage after every line. The chart should stop just before the radiation level is on-tenth of the sage level, because the more cautious analysts will require a safety factor of 10.
In: Computer Science
Using Octave, analyze the response for the system to a unit step input. Share the code or commands used.
System : x'''+3x''+2x=0
In: Computer Science
Consider the following relation with structure PROJECT(ProjectID, EmployeeName, EmployeeSalary). ProjectID EmployeeName EmployeeSalary 100A Eric Jones 64,000 100A Donna Smith 70,000 100B Donna Smith 70,000 200A Eric Jones 64,000 200B Eric Jones 64,000 200C Eric Parks 58,000 200C Donna Smith 70,000 200D Eric Parks 58,000 Suppose that the following functional dependencies exist: (ProjectID, EmployeeName) → EmployeeSalary EmployeeName → EmployeeSalary Normalize this relation into BCNF. For this problem you only need to include table names, primary keys, and attributes as part of your solutions.
In: Computer Science
QUESTION 5
What is printed?
int[] aArray = {1, 2, 3, 4};
int[] bArray = {5, 6, 7, 8}; bArray = aArray;
System.out.print(bArray[2]);
1 points
QUESTION 6
What is printed?
public static void main(String[] args)
{ int[] aArray = { 1, 2, 3, 4 }; System.out.print(aArray[2]);
int i = aMeth(aArray);
System.out.print(i + "" + aArray[2]);
}
public static int aMeth(int[] iArray)
{ for (int i = 0; i < iArray.length; i++)
{ iArray[i]++;
} int[] bArray = { 5, 6, 7, 8 };
iArray = bArray;
return iArray[2]; }
1 points
QUESTION 7
Assuming that array myList is properly declared and initialized with values, what best describes the following code snippet?
double max = myList[0];
for (int i = 1; i < myList.length; i++) {
if (myList[i] > max) max = myList[i];
}
sets max to the largest index in the array |
||
sets max to the index of the largest value in the array |
||
sets max to the largest positive value in the array |
||
sets max to the largest value in the array |
1 points
QUESTION 8
Given the following two arrays, which of the following will copy the values from sourceArray into targetArray?
int[] sourceArray = {2, 3, 1, 5, 10};
int[] targetArray = new int[sourceArray.length];
sourceArray = targetArray; |
||
targetArray = sourceArray; |
||
targetArray[] = sourceArray[]; |
||
sourceArray.copyInto(targetArray, 0, sourceArray.length);; |
||
None of the above |
QUESTION 1
An array is an object
True
False
1 points
QUESTION 2
To add a new element on to the end of an array myArray,
assign a new value to element myArray[myArray.length] |
||
use the myArray.add method |
||
use the myArray.resize method followed by the myArray.add |
||
new elements can't be added on to the end of an array |
1 points
QUESTION 3
Assume myArray is a valid and instantiated array of int values. Also assume the user is asked for an int value arIndx, and enters -1.
myArray[arIndx] = 3;
will
set the [-1] element of myArray to 3, even though this memory isn't in myArray's memory |
||
cause a compiler error |
||
cause a runtime exception |
||
renumber myArray's elements to be from -1 to myArray.length-2 |
1 points
QUESTION 4
Note: Multiple Answer
Which of the following will add 1 to each element of an appropriately declared, created and initialized int[] iVals?
int i = iVals.length - 1; while (i >= 0) { iVals[i]++; i--; } |
||
for (int i: iVals) { i = i + 1; } |
||
for (int i: iVals) { iVals[i]++; } |
||
for (int i = 0; i < iVals.length; i++) { iVals[i] += 1 |
QUESTION 9
In order to perform a binary search on an array, which of the following must be true (select all that apply)?
The array must be ordered |
||
The array must contain integers |
||
The array must have an even number of elements |
||
The array must have an odd number of elements |
1 points
QUESTION 10
Command line arguments are made available to main() via an array of _______.
1 points
QUESTION 11
The first action performed in a binary search is
Determine the largest value in the array |
||
Determine the smallest value in the array |
||
Determine the mid-point of the array |
||
Determine if the array is sorted |
1 points
QUESTION 12
If an array contains unordered values, searching for a particular value
is accomplished with a linear search |
||
is accomplished with the bipolar search |
||
can't be done in Java |
||
requires multiple parallel processing threads |
1 points
QUESTION 13
What best describes the processing of the following method?
public static int[] mystery(int[] list) {
int[] result = new int[list.length];
for (int i = 0, j = result.length - 1;
i < list.length; i++, j--) {
result[j] = list[i];
}
return result;
}
Returns an array with the values from list sorted in ascending order |
||
Returns an array with the values from list sorted in descending order |
||
Returns an array with the values from list decremented by 1 |
||
Returns an array with the values from list reversed |
1 points
QUESTION 14
The first action performed in Selection Sort is
convert all values to integers |
||
find the largest value in the array |
||
locate the midpoint of the array |
||
find the smallest value in the array |
1 points
QUESTION 15
When Selection Sort is run against an array the end result is
the values in the array are reordered smallest to largest |
||
the array is unchanged because the sorted values are placed in a different array |
||
none of the other answers are correct |
||
the values in the array are reordered largest to smallest |
In: Computer Science
Which of the following statements is true?
a.
A network interface card (NIC) is assigned a permanent IP address
by the manufacturer.
b.
A MAC address is assigned dynamically by DHCP and can change when
you attach your computer to a different network.
c.
An IP address is assigned dynamically by DHCP and can change when
you attach your computer to a different network.
d.
To communicate via inter-networking, a device does not require a
MAC address.
e.
To communicate with a device on another subnetwork, a device uses
Address Resolution Protocol (ARP) to get the MAC address of the
destination device.
In: Computer Science
Suppose that I have a relation with the following structure, where (EmployeeID, Department) is a composite primary key.
DEPARTMENT (EmployeeID, EmployeeName, Department, TotalSales).
Further suppose that the following functional dependencies exist
(EmployeeID, Department) → (EmployeeName, TotalSales)
EmployeeID → EmployeeName
True or False: The above relation is in 2NF.
True or False: A relation in second normal form is automatically in third normal form.
True or False: If PartNumber → PartWeight, then PartNumber will be unique in a relation.
In: Computer Science
Bayes' Theorem- drug screening
The national flufferball association decides to implement a drug screening procedure to test its athletes for illegal performance enhancing drugs. 3% of the professional flufferball players actually use performance enhancing drugs. A test for the drugs has a false positive rate of 2% and a false negative rate of 4%. In other words, a person who does not take the drugs will test positive with probability 0.02. A person who does take the drugs will test negative with probability 0.04. A randomly selected player is tested and tests positive. What is the probability that she really does take performance enhancing drugs?
In: Computer Science
Stateless packet filtering is performed on a per-packet basis.
A typical enterprise firewall has at minimum the following interfaces?
Which Vagrant providers are not shipped with the software?
In: Computer Science
You are going to create a console based program to keep track of a small business that sells Doodads.
First you will need to create a class Doodad that keeps track of two integers and two Strings.
Next, create a constructor for the Doodad.
Next, add getters and setters for each of the fields (two integers and two Strings).
You need to use Doodad.java (see the starter code)
Inside your main method ask the user to read in the two integers and two Strings. Create a Doodad object and add it to an array of 100 Doodad objects. Allow the user to keep entering in Doodad objects until the user wishes to quit.
Once the user is done entering Doodad objects, show the information about the Doodads they entered.
You will show the first number, followed by a space, followed by the first word.
In: Computer Science
In: Computer Science
please summarize the basic concept of how data can be contained and manipulated effectively in an array
In: Computer Science
Keep getting error where the code cannot read the text file and create an arraylist of objects from it.
HouseListTester:
import java.util.*;
//Hard codes the criteria
public class HouseListTester {
static HouseList availableHouses;
public static void main(String []args) {
availableHouses = new
HouseList("C:\\Users\\jvs34\\Downloads\\houses.txt");
Criteria c1 = new Criteria(1000, 500000, 100, 5000, 0, 10);
Criteria c2 = new Criteria(1000, 100000, 500, 1200, 0, 3);
Criteria c3 = new Criteria(100000, 200000, 1000, 2000, 2, 3);
Criteria c4 = new Criteria(200000, 300000, 1500, 4000, 3, 6);
Criteria c5 = new Criteria(100000, 500000, 2500, 5000, 3, 6);
System.out.println("Test 1: ");
availableHouses.printHouses(c1);
System.out.println("Test 2: ");
availableHouses.printHouses(c2);
System.out.println("Test 3: ");
availableHouses.printHouses(c3);
System.out.println("Test 4: ");
availableHouses.printHouses(c4);
System.out.println("Test 5: ");
availableHouses.printHouses(c5);
}
}
HouseList:
import java.io.*;
import java.util.*;
//Contains arraylist of House objects that comes from house.txt to
allow for easy searching
public class HouseList {
ArrayList<House> houseList = new ArrayList<>();
//Gets house.txt file for future use
public HouseList(String HouseLists) {
houseList = new ArrayList();
Scanner myFileIn = null;
try
{
myFileIn = new Scanner(new File(HouseLists));
}
catch (FileNotFoundException e)
{
System.out.println("File: "+HouseLists+" is not found");
}
//Gets house info from text file to place into arraylist
String address1;
int price1;
int area1;
int numBedrooms1;
House h1;
while(myFileIn.hasNextLine())
{
address1 = myFileIn.next();
price1 = myFileIn.nextInt();
area1 = myFileIn.nextInt();
numBedrooms1 = myFileIn.nextInt();
h1 = new House(address1, price1, area1, numBedrooms1);
houseList.add(h1);
}
}
//prints houses that meet criteria
public void printHouses(Criteria c) {
for(int i =0;i<houseList.size();i++)
{
System.out.println(houseList.get(i).toString());
}
}
//returns string of details of houses
public String getHouses(Criteria c) {
String ans = "";
for(int i = 0;i < houseList.size();i++)
{
if(houseList.get(i).satisfies(c))
{
ans = ans + houseList.get(i).toString() + "\n";
}
}
return ans;
}
}
House:
import java.util.*;
//Represents details of houses for sale
public class House {
public String address;
public int price;
public int area;
public int numberOfBedrooms;
//constructor
public House(String addr, int p, int a, int bedroom) {
address = addr;
price = p;
area = a;
numberOfBedrooms = bedroom;
}
//gets address
public String getAddress() {
return address;
}
//gets price
public int getPrice() {
return price;
}
//gets area
public int getArea() {
return area;
}
//gets rooms
public int getRoom() {
return numberOfBedrooms;
}
//Compare price, area, and rooms
public boolean satisfies(Criteria c) {
if(price < c.getMinimumPrice() || price >
c.getMaximumPrice())
{
return false;
}
if(area < c.getMinimumArea() || area >
c.getMaximumArea())
{
return false;
}
if(numberOfBedrooms < c.getMinimumNumberOfBedrooms() ||
numberOfBedrooms > c.getMaximumNumberOfBedrooms())
{
return false;
}
return true;
}
//print it out into string
public String toString() {
return (address+ " "+ price + " " + area + " " +
numberOfBedrooms);
}
}
Criteria:
import java.util.*;
//contains criteria to select houses
public class Criteria {
public int minimumPrice;
public int maximumPrice;
public int minimumArea;
public int maximumArea;
public int minimumNumberOfBedrooms;
public int maximumNumberOfBedrooms;
//constructor
public Criteria(int minPrice, int maxPrice, int minArea, int
maxArea, int minRoom, int maxRoom) {
minimumPrice = minPrice;
maximumPrice = maxPrice;
minimumArea = minArea;
maximumArea = maxArea;
minimumNumberOfBedrooms = minRoom;
maximumNumberOfBedrooms = maxRoom;
}
//returns minimum price
public double getMinimumPrice() {
return minimumPrice;
}
//returns maximum price
public double getMaximumPrice() {
return maximumPrice;
}
//returns minimum area
public double getMinimumArea() {
return minimumArea;
}
//returns maximum area
public double getMaximumArea() {
return maximumArea;
}
//returns minimum bedrooms
public double getMinimumNumberOfBedrooms() {
return minimumNumberOfBedrooms;
}
//returns maximum bedrooms
public double getMaximumNumberOfBedrooms() {
return maximumNumberOfBedrooms;
}
}
Text file:
123-canal-street 129000 1800 3
124-main-street 89000 1600 3
125-college-street 199000 2000 4
126-lincoln-street 56000 1200 2
127-state-street 82000 1500 3
223-canal-street 385000 4500 5
224-main-street 40000 800 2
225-college-street 37999 800 2
226-lincoln-street 125000 1200 2
227-state-street 130000 1250 3
323-canal-street 60000 900 2
324-main-street 80000 1000 2
325-college-street 45000 800 1
326-lincoln-street 63000 900 1
327-state-street 145000 1400 3
423-canal-street 199999 2000 4
424-main-street 250000 3500 5
425-college-street 350000 4600 6
426-lincoln-street 133000 1300 2
427-state-street 68000 850 1
523-canal-street 299999 3000 4
524-main-street 260000 2500 6
525-college-street 359000 4900 4
526-lincoln-street 233000 1900 2
527-state-street 58000 750 1
It would be much appreciated to get some help on this.
In: Computer Science