Questions
Which of the following statements is true? a. A network interface card (NIC) is assigned a...

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...

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...

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. True False A typical enterprise firewall has...

Stateless packet filtering is performed on a per-packet basis.

  1. True
  2. False

A typical enterprise firewall has at minimum the following interfaces?

  1. Outside
  2. Inside
  3. DMZ
  4. All of the above

Which Vagrant providers are not shipped with the software?

  1. Virtualbox
  2. Hyper-V
  3. Nutanix
  4. Docker

In: Computer Science

You are going to create a console based program to keep track of a small business...

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

Windows Interprocess communication. WM_CopyData IPC (data copy) - source code (c++) windows data copy IPC code



Windows Interprocess communication.
WM_CopyData IPC (data copy) - source code (c++)

windows data copy IPC code

In: Computer Science

please summarize the basic concept of how data can be contained and manipulated effectively in an...

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...

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

Counting Severe Acute Respiratory Syndrome coronavirus 2 genome bps: Download the FASTA file (NC_045512.2) containing the...

  1. Counting Severe Acute Respiratory Syndrome coronavirus 2 genome bps: Download the FASTA file (NC_045512.2) containing the SARS-CoV-2 reference sequence. (You can use the "Send" widget on the upper-right corner of the NCBI Web page containing the genome to download a FASTA file.) Now, write a Python program that reads the file, stores the sequence without white characters (spaces, end-of-line, etc.), and prints out the number of nucleotides (bps) in the complete SARS-CoV-2 genome.

In: Computer Science

write JAVA code with the following condition Write the pseudocode for a new data type MyStack...

write JAVA code with the following condition

Write the pseudocode for a new data type MyStack that implements a stack using the fact that you have access to a queue data structure with operations enqueue(), dequeue(), isEmpty(). Remember that every stack should have the operations push() and pop().

Hint: use two queues, one of which is the main one and one is temporary. Please note that you won’t be able to implement both push() and pop() in constant time. One of the two will have to run in O(n), where n is the number of elements in the stack.

In: Computer Science

I need assistance translating a custom C++ program to MIPS. My C++ code is the following:...

I need assistance translating a custom C++ program to MIPS. My C++ code is the following: I have made numerous attempts on my own to no avail, any assistance is appreciated. Also, template code for this solution is provided below:

#include

int moveRobots(int *, int *, int, int );

int getNew(int, int);

int main()

{

int x[4], y[4], i, j, myX = 25, myY = 25, move, status = 1;

// initialize positions of four robots

x[0] = 0; y[0] = 0;

x[1] = 0; y[1] = 50;

x[2] = 50; y[2] = 0;

x[3] = 50; y[3] = 50;

cout << "Your coordinates: 25 25\n";

while (status == 1) {

    cout << "Enter move (1 for +x, -1 for -x, 2 for + y, -2 for -y):";

    cin >> move;

    // process user's move

    if (move == 1)

      myX++;

    else if (move == -1)

      myX--;

    else if (move == 2)

      myY++;

    else if (move == -2)

      myY--;

    // update robot positions

    status = moveRobots(&x[0],&y[0],myX,myY);

    cout << "Your coordinates: " << myX << " " << myY << endl;

   

    for (i=0;i<4;i++)

      cout << "Robot at " << x[i] << " " << y[i] << endl;

}

cout << "AAAARRRRGHHHHH... Game over\n";

}

int moveRobots(int *arg0, int *arg1, int arg2, int arg3)

{

int i, *ptrX, *ptrY, alive = 1;

ptrX = arg0;

ptrY = arg1;

  for (i=0;i<4;i++) {

    *ptrX = getNew(*ptrX,arg2); // update x-coordinate of robot i

    *ptrY = getNew(*ptrY,arg3); // update y-coordinate of robot i

    // check if robot caught user

    if ((*ptrX == arg2) && (*ptrY == arg3)) {

      alive = 0;

      break;

    }

    ptrX++;

    ptrY++;

}

return alive;

}

// move coordinate of robot closer to coordinate of user

int getNew(int arg0, int arg1)

{

int temp, result;

temp = arg0 - arg1;

if (temp >= 10)

    result = arg0 - 10;

else if (temp > 0)

    result = arg0 - 1;

else if (temp == 0)

    result = arg0;

else if (temp > -10)

    result = arg0 + 1;

else if (temp <= -10)

    result = arg0 + 10;

return result;

}

The following template code is given:

#
#   A proper program header goes here...
#
#
   .data      
x:   .word   0:4   # x-coordinates of 4 robots
y:   .word   0:4   # y-coordinates of 4 robots

str1:   .asciiz   "Your coordinates: 25 25\n"
str2:   .asciiz   "Enter move (1 for +x, -1 for -x, 2 for + y, -2 for -y):"
str3:   .asciiz   "Your coordinates: "
sp:   .asciiz   " "
endl:   .asciiz   "\n"
str4:   .asciiz   "Robot at "
str5:   .asciiz   "AAAARRRRGHHHHH... Game over\n"
  
#i   $s0
#myX   $s1
#myY   $s2
#move   $s3
#status   $s4
#temp,pointers   $s5,$s6
   .text
#   .globl   inc
#   .globl   getNew

main:   li   $s1,25       # myX = 25
   li   $s2,25       # myY = 25
   li   $s4,1       # status = 1

   la   $s5,x
   la   $s6,y

   sw   $0,($s5)   # x[0] = 0; y[0] = 0;
   sw   $0,($s6)
   sw   $0,4($s5)   # x[1] = 0; y[1] = 50;
   li   $s7,50
   sw   $s7,4($s6)
   sw   $s7,8($s5)   # x[2] = 50; y[2] = 0;
   sw   $0,8($s6)
   sw   $s7,12($s5)   # x[3] = 50; y[3] = 50;
   sw   $s7,12($s6)

   la   $a0,str1   # cout << "Your coordinates: 25 25\n";
   li   $v0,4
   syscall
  
   bne   $s4,1,main_exitw   # while (status == 1) {
main_while:
   la   $a0,str2   # cout << "Enter move (1 for +x,
   li   $v0,4       #   -1 for -x, 2 for + y, -2 for -y):";
   syscall
  
   li   $v0,5       # cin >> move;
   syscall
   move   $s3,$v0

   bne   $s3,1,main_else1# if (move == 1)
   add   $s1,$s1,1   # myX++;
   b   main_exitif
main_else1:
   bne   $s3,-1,main_else2   # else if (move == -1)
   add   $s1,$s1,-1   # myX--;
   b   main_exitif
main_else2:
   bne   $s3,2,main_else3   # else if (move == 2)
   add   $s2,$s2,1   # myY++;
   b   main_exitif
main_else3:   bne   $s3,-2,main_exitif   # else if (move == -2)
   add   $s2,$s2,-1   # myY--;
  
main_exitif:   la   $a0,x       # status = moveRobots(&x[0],&y[0],myX,myY);
   la   $a1,y
   move   $a2,$s1
   move   $a3,$s2
   jal   moveRobots
   move   $s4,$v0

   la   $a0,str3   # cout << "Your coordinates: " << myX
   li   $v0,4       # << " " << myY << endl;
   syscall
   move   $a0,$s1
   li   $v0,1
   syscall
   la   $a0,sp
   li   $v0,4
   syscall
   move   $a0,$s2
   li   $v0,1
   syscall
   la   $a0,endl
   li   $v0,4
   syscall

   la   $s5,x
   la   $s6,y
   li   $s0,0       # for (i=0;i<4;i++)
main_for:   la   $a0,str4   # cout << "Robot at " << x[i] << " "
   li   $v0,4       # << y[i] << endl;
   syscall
   lw   $a0,($s5)
   li   $v0,1
   syscall
   la   $a0,sp
   li   $v0,4
   syscall
   lw   $a0,($s6)
   li   $v0,1
   syscall
   la   $a0,endl
   li   $v0,4
   syscall
   add   $s5,$s5,4
   add   $s6,$s6,4
   add   $s0,$s0,1
   blt   $s0,4,main_for

   beq   $s4,1,main_while
               # }          
main_exitw:   la   $a0,str5   # cout << "AAAARRRRGHHHHH... Game over\n";
   li   $v0,4
   syscall
   li   $v0,10       #}
   syscall

In: Computer Science

Memory refers to the physical devices used to store programs or data. Main memory is used...

Memory refers to the physical devices used to store programs or data. Main memory is used for the information in physical systems which function at high speed (i.e. RAM), as compared to secondary memory, which are physical devices for program and data storage which are slow to access but offer higher memory capacity.

The cache memory is an intermediate level between the main memory and the processor. The goal is to store the most frequently and most recently accessed data in the upper-level unit (cache) to make returning to it much faster. Can this concept be used in any real life applications? If so, discuss its use and advantages.

In: Computer Science

Agile Manifesto has Twelve principles and Four Values. Outline three Principles or Values and show how...

Agile Manifesto has Twelve principles and Four Values. Outline three Principles or Values and show how they apply to either Scrum or Kanban.

In: Computer Science

Develop a MATLAB (or programming language of your choice) code to show the flow field for...

Develop a MATLAB (or programming language of your choice) code to show the flow field for lifting cylinder flow using the following specifications.

Set your free-stream velocity, cylinder radius, and vortex strength in the code. There are a total of four cases for which you will run your code (or have all four in one script). You will only be changing the vortex strength for the different cases. Therefore, set ?∞ = 1 and ? = 1 for all cases. Set your vortex strength to the following values for each case, Case 1: ? = 0, Case 2: ? = 8, Case 3: ? = 16, Case 4: Find the value for vortex strength that produces one stagnation point on the surface of the cylinder.

Set V = R = 1; Set Γ = value desired for specific case; Use mesh grid to create my domain, but do this in polar coordinates; Calculate x and y coordinates based on mesh grid; Calculate stream function as a function of r and theta; Calculate Vr and Vtheta as a function of r and theta; Convert Vr and Vtheta to u and v; Plot contours of stream function; Plot velocity field using quiver function;

In: Computer Science

Suppose the program counter (PC) is set to 0x30002000. Is it possible to use the jump...

Suppose the program counter (PC) is set to 0x30002000. Is it possible to use the jump (j) MIPS assembly instruction to jump directly to the instruction at 0x50003000? If yes, write the corresponding assembly instruction(s). If not, explain why and give other MIPS instruction(s) that can jump to this target address. (For this problem, assume that the instruction memory starts from 0x00000000 and goes to 0xFFFFFFFF.)

In: Computer Science