Routing connects different network segments and decides where __________are sent to

Answers

Answer 1

Answer:

Packets

Explanation:


Related Questions

Assume Flash Sort is being used on a array of integers with Amin = 51, Amax = 71, N=10, m=5 Items are classified according to the formula: K(A[i]) = 1 + (int) ( (m-1) * (A[i] - Amin) / (Amax - Amin) ) What is the classification for 63?

Answers

Answer:

3

Explanation:

= 1 + (int) (4*(63 - 51)/(71-51)))

= 1 + (int) (4*12/20)

= 1 + (int) (48/20)

= 1 + (int)2.4

= 1 + 2

= 3

Each week, the Pickering Trucking Company randomly selects one of its 30 employees to take a drug test. Write an application that determines which employee will be selected each week for the next 52 weeks. Use the Math. random() function explained in Appendix D to generate an employee number between 1 and 30; you use a statement similar to: testedEmployee = 1 + (int) (Math.random() * 30); After each selection, display the number of the employee to test. Display four employee numbers on each line. It is important to note that if testing is random, some employees will be tested multiple times, and others might never be tested. Run the application several times until you are confident that the selection is random.

Answers

Answer:

Following are the program to this question:

import java.util.*; //import package

public class Main //defining class

{

 public static void main(String[] args) //defining main method

 {

   int testedEmployee; //defining integer variable

   for(int i = 1;i<=52;i++) //defining loop that counts from 1 to 52  

   {

     testedEmployee = 1 + (int) (Math.random() * 30); //using random method that calculate and hold value

     System.out.print(testedEmployee+"\t"); //print value

     if(i%4 == 0)//defining codition thats checks value is divisiable by 4  

     {

       System.out.println(); //print space

     }

   }

 }

}

Output:

please find the attachment.

Explanation:

In the given java program, a class Main is declared, inside the class, the main method is declared, in which an integer variable "testedEmployee", is declared, in the next line, the loop is declared, that can be described as follows:

Inside the loop, a variable "i" is declared, which starts from 1 and stop when its value is 52, inside the loop a random method is used, that calculates the random number and prints its value. In the next step, a condition is defined, that check value is divisible 4 if this condition is true, it will print a single space.

Write a script that creates and calls a stored procedure named test. This procedure should use a transaction that includes the statements necessary to combine two customers. These statements should do the following: Select a row from the Customers table for the customer with a customer_id value of 6. This statement should lock the row so other transactions can’t read or modify it until the transaction commits, and it should fail immediately if the row is locked from another session. Update the Orders table so any orders for the selected customer are assigned to the customer with a customer_id value of 3. Update the Addresses table so any addresses for the selected customer are assigned to the customer with a customer_id value of 3. Delete the selected customer from the Customers table. If these statements execute successfully, commit the changes. Otherwise, rollback the changes.

Answers

Answer:

Check the explanation

Explanation:

use `my_guitar_shop`;

#delete the procedure test if it exists.

DROP PROCEDURE IF EXISTS test;

DELIMITER //

CREATE PROCEDURE test ()

BEGIN

   #declare variable sqlerr to store if there is an sql exception

  declare sqlerr tinyint default false;

   #declare variable handler to flag when duplicate value is inserted

  declare continue handler for 1062 set sqlerr = TRUE;

   #start transaction

   start transaction;

  delete from order_items where order_id in

      (select order_id from orders where customer_id=6);

  delete from orders where customer_id=6;

  delete from addresses where customer_id=6;

  delete from customers where customer_id=6;

 

   if sqlerr=FALSE then

      commit;

        select 'Transaction Committed' as msg;

  else

       rollback;

       select 'Transaction rollbacked' as msg;

   end if;

end //

delimiter ;

call test();

5.6 Look carefully at how messages and mailboxes are represented in the email system that you use. Model the object classes that might be used in the system implementation to represent a mailbox and an email message

Answers

Answer:

See explaination for the details of the answer.

Explanation:

A class is a structured diagram that describes the structure of the system.

It consists of class name, attributes, methods and responsibilities.

A mailbox and an email message has some certain attributes such as, compose, reply, draft, inbox, etc.

See attachment for the Model object classes that might be used in the system implementation to represent a mailbox and an email message.

You wish to lift a 12,000 lb stone by a vertical distance of 15 ft. Unfortunately, you can only generate a maximum pushing force of 2,000 lb.

a. What is the amount of work you must input in order to move the stone?

b. What is the actual mechanical advantage (AMA) required by a machine to complete the work above?

c. You build a ramp to create the ideal mechanical advantage. What is the length of the ramp in feet?

Answers

Answer:

The answer is "180,000, 6, and  90"

Explanation:

The answer to this question can be described as follows:

[tex]\ force = 12,000 \ lb \\\\\ distance = 15 \ ft \\\\ \ Formula : \\\\ \ total \ work = force \times distance \\\\ \ IMA = \frac{load}{effort} \\\\\ OR \\\\ \ IMA = \frac{\ distance \ move \ by \ load }{\ distance \ moved \ by \ efforts}[/tex]

[tex]a ) \\\\\ total \ work = 12,000 \times 15 \\\\\ total \ work = 180,000 ft \cdot lbf[/tex]

[tex]b) \\\\IMA = \frac{12000}{2000} = 6 \\\\ c) \\\\IMA = \frac{Y}{15} \\\\6= \frac{Y}{15}\\\\Y= 90\\\\X = \sqrt{8100-225}\\\\X = \sqrt{90^2-15^2} \\\\X= \sqrt{7875} \\\\X =88.74 ft\\\\[/tex]

by comparing the length of the ramp is 90 ft.

Explain the term duty cycle and determine the pulse duration of a periodic pulse train whose duty cycle is 15% and frequency is 13.3Mhz. Interprete your results.

Answers

Answer:

Duty cycle of a signal measures the fraction of a  time of a given transmitter is transmitting that signal. This fraction of a time determines the overall or total power transmitted or delivered by that signal.

More power is possessed by duty cycles with longer signals. This gives the signal the following characteristics such as reliability, strength and easy detection and thus require less efficient receivers.Less power is associated  with duty cycles of shorter signals. This gives the signal the following characteristics  such as less reliability, lower strength and not easily detected and thus require more efficient receivers.

Duty cycle = 15 %

frequency =  13.3Mhz = 13.3 x 10^3 hz = I/T = F

T = period = 1 / F = 1/13.3 x 10^3 hz= 7.5188 x 10 ^-5 s

Duty cycle = pulse duration/ period

15 % = PD/7.5188 x 10 ^-5 s

PD = 15/100 X 7.5188 x 10 ^-5 s = 1.12782 x 10^ -5 s

INTERPRETATION OF RESULTS

With a duty of 15 % and pulse duration of 1.12782 x 10^ -5 s, the strength is low , short signal and less reliable and needs more efficient receiver

Explanation:

Duty cycle of a signal measures the fraction of a  time of a given transmitter is transmitting that signal. This fraction of a time determines the overall or total power transmitted or delivered by that signal.

More power is possessed by duty cycles with longer signals. This gives the signal the following characteristics such as reliability, strength and easy detection and thus require less efficient receivers.Less power is associated  with duty cycles of shorter signals. This gives the signal the following characteristics  such as less reliability, lower strength and not easily detected and thus require more efficient receivers.

Duty cycle = 15 %

frequency =  13.3Mhz = 13.3 x 10^3 hz = I/T = F

T = period = 1 / F = 1/13.3 x 10^3 hz= 7.5188 x 10 ^-5 s

Duty cycle = pulse duration/ period

15 % = PD/7.5188 x 10 ^-5 s

PD = 15/100 X 7.5188 x 10 ^-5 s = 1.12782 x 10^ -5 s

INTERPRETATION OF RESULTS

With a duty of 15 % and pulse duration of 1.12782 x 10^ -5 s, the strength is low , short signal and less reliable and needs more efficient receiver

About n processes are time-sharing the CPU, each requiring T ms of CPU time to complete. The context switching overhead is S ms. (a) What should be the quantum size Q such that the gap between the end of one quantum and the start of the next quantum of any process does not exceed M ms? (b) For n = 5, S = 10, and M = 450, M = 90, M = 50, determine: The corresponding values of Q The percentage of CPU time wasted on context switching

Answers

Answer:

(a) Q = (M-(1-n)S)/n

(b)    

When M = 450,

       Q = 82

       % CPU time wasted = 8.889%

When M = 90,

       Q = 10

       % CPU time wasted = 44.44%

When M = 50,

       Q = 2

       % CPU time wasted = 80%

Explanation:

Given  Data:

n = process

T = ms time

Context switch time overhead = S

and M is total overhead

See attached file for the calculation.

Final answer:

To determine the appropriate quantum size Q in a CPU time-sharing system with n processes and context-switching overhead S, one must calculate Q in relation to the maximum allowed gap M between quanta. This will enable scheduling that satisfies the gap constraint and maximizes CPU efficiency. The waste percentage of CPU time due to context switching can then be calculated.

Explanation:

The question involves calculating the appropriate quantum size for CPU time-sharing and the related context switching overhead. Given are the number of processes (n), context switching overhead (S), and the maximum allowed gap (M) between quanta. The quantum size (Q) must be chosen to ensure that a process resumes its next quantum within the specified maximum allowed gap after its last quantum ends, considering the context switching overhead.

For part (a), a general formula must be determined that takes into account S and M to calculate Q. For part (b), the formula will be applied with fixed values of n = 5, S = 10 ms, and varying values for M. Having M = 450, 90, 50 ms, the respective Qs will be calculated. Then, the percentage of CPU time wasted on context switching will be determined using the formula:


Percent CPU time wasted = (
( n * S ) / ( n * ( Q + S ) )
) * 100%

Lastly, the results will highlight how the quantum size influences the efficiency of the system by reducing the relative amount of time spent on context switching.

Write your own unique Python program that has a runtime error. Do not copy the program from your textbook or the Internet. Provide the following.

The code of your program.
Output demonstrating the runtime error, including the error message.
An explanation of the error message.
An explanation of how to fix the error.

Answers

Answer:

myVariable = 3 print(myvariable)

Runtime error:

NameError: name 'myvariable' is not defined

Explanation:

Runtime error is an error detected when running a program. In the given code example, there is a variable, myVariable initialized with 3 (Line 1). In the second line, we try to print the variable. But instead of placing myVariable in the print function, we put myvariable which is a different variable name (even though the difference is only with one lowercase letter). The Python will capture it as a runtime error as the variable name cannot be defined.

To fix the error, we just need to change the variable name in print statement to myVariable

myVariable = 3 print(myVariable)

The runtime error inside a program is the one that happens when the program is being executed after it has been successfully compiled. It's also known as "bugs," which are frequently discovered during the debugging phase first before the software is released.

Code:

Demonstrating the output with a runtime error, including the error message.

a= input("input any value: ")#defining a variable that input value

b= int(input("Enter any number value: "))#defining b variable that input value

s=a+b#defining s variable that adds the inputs value

print(s)#print added value

In the above-given code, when "s" variable "adds" the input values it will give an error message, and to solve these errors we must convert the b variable value into the string, since "a" is a string type variable.

Correction in code:

#Code 1 for demonstrating the output with runtime error, including the error message.

a= input("input any value: ")#defining a variable that input value

b= int(input("Enter any number value: "))#defining b variable that input value

b=str(b)#defining b variable that converts input value into string and hold its value

s=a+b#defining s variable that adds the inputs value

print(s)#print added value

Output:

Please find the attached file.

Learn more:

brainly.com/question/21296934

1. Write a telephone lookup program. Read a data set of 1, 000 names and telephone numbers from a file that contains the numbers in random order. Handle lookups by name and also reverse lookups by phone number. Use a binary search for both lookups.

Answers

Answer:

Kindly note that, you're to replace "at" with shift 2 as the brainly text editor can't take the symbol

Explanation:

PhoneLookup.java

import java.io.FileReader;

import java.io.IOException;

import java.util.Scanner;

public class PhoneLookup

{

  public static void main(String[] args) throws IOException

  {

     Scanner in = new Scanner(System.in);

     System.out.println("Enter the name of the phonebook file: ");

     String fileName = in.nextLine();

     LookupTable table = new LookupTable();

     FileReader reader = new FileReader(fileName);

     table.read(new Scanner(reader));

   

     boolean more = true;

     while (more)

     {

        System.out.println("Lookup N)ame, P)hone number, Q)uit?");

        String cmd = in.nextLine();

       

        if (cmd.equalsIgnoreCase("Q"))

           more = false;

        else if (cmd.equalsIgnoreCase("N"))

        {

           System.out.println("Enter name:");

           String n = in.nextLine();

           System.out.println("Phone number: " + table.lookup(n));

        }

        else if (cmd.equalsIgnoreCase("P"))

        {

           System.out.println("Enter phone number:");

           String n = in.nextLine();

           System.out.println("Name: " + table.reverseLookup(n));

        }

     }

  }

}

LookupTable.java

import java.util.ArrayList;

import java.util.Collections;

import java.util.Scanner;

/**

  A table for lookups and reverse lookups

*/

public class LookupTable

{

  private ArrayList<Item> people;

  /**

     Constructs a LookupTable object.

  */

  public LookupTable()

  {

      people = new ArrayList<Item>();

  }

  /**

     Reads key/value pairs.

     "at"param in the scanner for reading the input

  */

  public void read(Scanner in)

  {

     while(in.hasNext()){

         String name = in.nextLine();

         String number = in.nextLine();

         people.add(new Item(name, number));

     }

  }

  /**

     Looks up an item in the table.

     "at"param k the key to find

     "at"return the value with the given key, or null if no

     such item was found.

  */

  public String lookup(String k)

  {

     String output = null;

     for(Item item: people){

         if(k.equals(item.getName())){

             output = item.getNumber();

         }

     }

     return output;

  }

  /**

     Looks up an item in the table.

     "at"param v the value to find

     "at"return the key with the given value, or null if no

     such item was found.

  */

  public String reverseLookup(String v)

  {

      String output = null;

         for(Item item: people){

             if(v.equals(item.getNumber())){

                 output = item.getName();

             }

         }

         return output;

  }

}

Item.java

public class Item {

  private String name, number;

 

  public Item(String aName, String aNumber){

      name = aName;

      number = aNumber;

  }

 

  public String getName(){

      return name;

  }

 

  public String getNumber(){

      return number;

  }

}

input.txt

Abbott, Amy

408-924-1669

Abeyta, Ric

408-924-2185

Abrams, Arthur

408-924-6120

Abriam-Yago, Kathy

408-924-3159

Accardo, Dan

408-924-2236

Acevedo, Elvira

408-924-5200

Acevedo, Gloria

408-924-6556

Achtenhagen, Stephen

408-924-3522

Kindly check the attached output image below.

A router receives a packet and determines the outbound link for the packet. When the packet arrives, 2/3 of one other packet is done being transmitted on this outbound link and five other packets are waiting to be transmitted. Packets are transmitted in order of arrival. Suppose all packets are 3,000 bytes, and the link rate is 4 Mbps. What is the queuing delay for the packet

Answers

Answer:

Queuing Delay is 0.08 seconds

Explanation:

The answer follows a formula that is relatively easy to use and is detailed below.

Queuing Delay = [(L - x) + (nL)] / R

where,

L is packet length given as 3,000 bytes

x is the currently transmitted packet given as 2/3 * 3,000 = 2,000

n is the number of packets waiting in the Que given as 5

R is the rate of transmission given as 4 Mbps (4 * 10^6 Bps)

We can simply plug in the above information in the equation for computing Queuing Delay.

Lets take the numerator first which would be [(3000 - 2000) + (5 * 3000)]

The numerator would be 16000 bytes. These are being transmitted at 4Mbps. So, 16000*4*5 = 320,000 "bits"

Queuing Delay= 320,000/4000000

Queuing Delay = 0.08 seconds.

As we can see, the formula is quite intuitive to use. You are simply taking the number of packets to be transmitting, incorporating the partially transmitted packet, multiplying by the number of packets and the rate of transmission and then dividing the product by the rate of transmission to compute what the delay in the Que is.

Challenge: Tic-Tac-Toe (Report a problem) Detecting mouse clicks For this step of the challenge you will complete Tile's handleMouseClick method. The handleMouseClick method has two parameters: x and y which represent the coordinates of where the user clicked the mouse. When a user clicks inside a tile, that tile's handleMouseClick method should call that tile's onClick method. To check if the mouse click is inside of the tile, you will need an if statement that checks if: - the mouse click is on, or right of, the left edge of the tile - the mouse click is on, or left of, the right edge of the tile - the mouse click is on, or below, the upper edge of the tile - the mouse click is on, or above, the lower edge of the tile

Answers

Final answer:

To detect a mouse click within a tile in a Tic-Tac-Toe game, one must implement a conditional statement in the handleMouseClick method that checks if the click's coordinates fall within the tile's bounds. If the click is valid, the tile's onClick method is called.

Explanation:

The student's question concerns a programming task involving the development of a Tic-Tac-Toe game and specifically addresses the implementation of a method to detect mouse clicks within a tile. To accomplish this, the handleMouseClick method needs an if statement to check whether the click occurred within the boundaries of the tile. The if statement must compare the x and y coordinates of the mouse click against the left, right, upper, and lower edges of the tile.

To implement this, the conditional check might look like this:

if (x >= tileLeftEdge && x <= tileRightEdge && y >= tileTopEdge && y <= tileBottomEdge) {
 onClick(); // Call the onClick method for the tile
}

This code snippet checks that the mouse click's x coordinate is within the horizontal bounds of the tile and the y coordinate is within the vertical bounds. If both conditions are satisfied, it then calls the onClick method associated with the tile, indicating a valid click.

Expressions Write a console program that prompts the user for 3 double precision floating point values input1, input2, input3. Have the program compute and display the following values. the sum of input1, input2, input3 the average of input1, input2, input3 the log2 of input1 To access the built-in function log2 -- log2(X) computes the base 2 logarithm of X, you need to include the header at the top of your code.

Answers

Answer:

See Explaination

Explanation:

#include <iostream>

#include <cmath>

using namespace std;

int main()

{

float input1, input2, input3;

float sum=0.0, avg, l;

cout<<"enter the value for input1: ";

cin>>input1;

cout<<"enter the value for input2: ";

cin>>input2;

cout<<"enter the value for input3: ";

cin>>input3;

sum=input1+input2+input3;

cout<<"sum of three numbers: "<<sum<<endl;

avg=sum/3;

cout<<"average of three numbers: "<<avg<<endl;

l=log2(input1);

cout<<"log2 value of input1 number: "<<l;

return 0;

}

output:

enter the value for input1: 4

enter the value for input2: 5

enter the value for input3: 6

sum of three numbers: 15

average of three numbers: 5

log2 value of input1 number: 2

A binary search algorithm is written (as in the modules, for example) which searches a pre-sorted array for some user-defined value, clientData. If clientData is stored in the array, it returns its array position, and if not found, it returns -1 (again, just like in the modules). Assume the array to be searched has 100 data elements in it. (Check all that apply):[NOTE: due to common off-by-one interpretations when counting such things, if your predicted answer is within one (+1 or -1) of a posted option below, you can assume your prediction and the choice you are looking at are equivalent and check that option.]A. It might return to the client with an answer after only one comparison of data.B. It may require as many as 99 comparisons of data before it returns.C. It will always return with an answer in 7 or fewer comparisons of data.D. It will always return with an answer in 3 or fewer comparisons of data.

Answers

Answer:

c) it will always return with an answer of 7 or fewer comparisons of data.

Explanation:

As maximum number of comparison in worst case for sorted binary search is log₂n, here n = 100, so maximum search is at least 6.6 which is approximately 7.

Lab Assignment 7A For the lab this week, you will sort an array - using any of the sort methods discussed in Chapter 23 or the Selection sort. It's your choice. Use the following criteria for your assignment: Write a program that uses a two-dimensional array to store daily minutes walked and carb intake for a week. Prompt the user for 7 days of minutes walked and carb intake; store in the array. Write a sort ( your choice which sort ) to report out the sorted minute values -lowest to highest. Write another to report out the sorted carb intake - highest to lowest. These methods MUST be your original code. Your program should output all the values in the array and then output the 2 sorted outputs. You must use an array to receive credit for this assignment

Answers

Answer:

See explaination

Explanation:

import java.util.Scanner;

public class sort {

static void lowestToHighest(float arr[][])

{

float temp;

for(int i=0;i<11;i++)

for(int j=0;j<12-i-1;j++) //Using bubble sort to sort

{

if(arr[j][0]>arr[j+1][0])

{

temp = arr[j][0];

arr[j][0] = arr[j+1][0];

arr[j+1][0] = temp;

}

}

for(int i=0;i<11;i++) //Using bubble sort to sort

{

for(int j=0;j<12-i-1;j++)

if(arr[j][1]>arr[j+1][1])

{

temp = arr[j][1];

arr[j][1] = arr[j+1][1];

arr[j+1][1] = temp;

}

}

System.out.println("Data in the array after sorting lowest to highest: ");

for(int i=0;i<12;i++)

System.out.printf(arr[i][0]+" "+arr[i][1]+"\n");

}

static void highestToLowest(float arr[][])

{

float temp;

for(int i=0;i<11;i++)

for(int j=0;j<12-i-1;j++) //Using bubble sort to sort

{

if(arr[j][0]<arr[j+1][0])

{

temp = arr[j][0];

arr[j][0] = arr[j+1][0];

arr[j+1][0] = temp;

}

}

for(int i=0;i<11;i++) //Using bubble sort to sort

{

for(int j=0;j<12-i-1;j++)

if(arr[j][1]<arr[j+1][1])

{

temp = arr[j][1];

arr[j][1] = arr[j+1][1];

arr[j+1][1] = temp;

}

}

System.out.println("Data in the array after sorting highest to lowest: ");

for(int i=0;i<12;i++)

System.out.printf(arr[i][0]+" "+arr[i][1]+"\n");

}

public static void main(String[] args){

float temperature[][]=new float[12][2];

Scanner input = new Scanner(System.in);

System.out.println("Enter 12 months of highest and lowest temperatures for each month of the year: ");

for(int i=0;i<12;i++)

for(int j=0;j<2;j++)

temperature[i][j]=input.nextFloat();

System.out.println("Data in the array: ");

for(int i=0;i<12;i++)

System.out.printf(temperature[i][0]+" "+temperature[i][1]+"\n");

lowestToHighest(temperature);

highestToLowest(temperature);

}

}

A certain application runs in 30 minutes on a single processor PXY system. A close analysis reveals that 6 minutes of execution is due to inherently sequential code, while the code for the remaining 24 minutes is fully parallelizable. We consider upgrading our system to a multi-core PXY system so as to make the running time at most 10 minutes. What is the minimum number of cores that we should use

Answers

Answer:

minimum number of cores required = 6

Explanation:

Time take by parallelizable code = 24 mins

Reduced time of parallelizable code = 4 mins

Speed gained = 24/4 = 6 times

Therefore minimum number of cores required = 6

Coach Kyle has some top athletes who have the potential to qualify for Olympics. They have been training very had for the 5000 and 10000 meters running competition. The coach has been recording their timings for each 1000 meters. In the practice sessions, each athlete runs a distance in multiples of 1000 meters and the coach records their time for every 1000 meters. Put the following in a text file called timings.txt. This is not a Python program. Just open up a text editor and copy the following to a file. Alice,3:15,2:45,3:30,2:27,3:42 Bob, 2:25,3:15,3:20,2:57,2:42,3:27 Charlie, 2:45,3:25,3:50,2:27,2:52,3:12 David,2:15,3:35,3:10,2:47 Write a main function that calls read_data, determines the min and max, calls get_average, and prints as below. a) Function read_data will read the file and returns a dictionary with the athlete information. b) Function get_average will accept a list of times and return the average time in the format min:sec. c) Use the split function to split the timings into individual elements of a list. d) Be sure to handle exceptions for files and incorrect data. Athlete Min Alice 2:27 Bob 2:25 Charlie 2:27 David 2:15 Max 3:42 3:27 3:50 3:35 Average 3:07 3:01 3:05 2:56

Answers

Answer:

Check the explanation

Explanation:

Coach Kyle is havaing the following data.

Alice 3:15, 2:45, 3:30, 2:27, 3:42

Bob 2:25, 3:15, 3:20, 2:57, 2:42, 3:27

Charlie 2:45, 3:25, 3:50, 2:27, 2:52, 3:12

David 2:15, 3:35, 3:10, 2:47

let us name it as Athlete. txt

now

1. Use a function to read the data from the file.

To read a file, we can use different methods.

file.read( )

If you want to return a string containing all characters in the file, you can

use file. read().

file = open('Athlete. txt', 'r')

print file. read()

Output:

Alice 3:15, 2:45, 3:30, 2:27, 3:42

Bob 2:25, 3:15, 3:20, 2:57, 2:42, 3:27

Charlie 2:45, 3:25, 3:50, 2:27, 2:52, 3:12

David 2:15, 3:35, 3:10, 2:47  

We can also specify how many characters the string should return, by using

file.read(n), where "n" determines number of characters.

This reads the first 5 characters of data and returns it as a string.

file = open('Athlete .txt', 'r')

print file.read(5)

Output:

alice  

file. readline( )  

The readline() function will read from a file line by line (rather than pulling  

the entire file in at once).  

Use readline() when you want to get the first line of the file, subsequent calls  

to readline() will return successive lines.  

Basically, it will read a single line from the file and return a string  

containing characters up to .  

file = open('athlete .txt', 'r')  

print file. readline():  

2.Implement the logic using Dictionary, List, and String:  

One way to create a dictionary is to start with the empty dictionary and add key-value pairs. The empty dictionary is denoted with a pair of curly braces, {}:  

Dictionary operations:  

The del statement removes a key-value pair from a dictionary. For example, the following dictionary contains the names of various fruits and the number of each fruit in stock:  

>>> inventory = {'apples': 430, 'bananas': 312, 'oranges': 525, 'pears': 217}  

>>> print(inventory)  

{'oranges': 525, 'apples': 430, 'pears': 217, 'bananas': 312}  

If someone buys all of the pears, we can remove the entry from the dictionary:  

>>> del inventory['pears']  

>>> print(inventory)  

{'oranges': 525, 'apples': 430, 'bananas': 312}  

Or if we’re expecting more pears soon, we might just change the value associated with pears:  

>>> inventory['pears'] = 0  

>>> print(inventory)  

{'oranges': 525, 'apples': 430, 'pears': 0, 'bananas': 312}  

The len function also works on dictionaries; it returns the number of key-value pairs:  

>>> len(inventory)  

4  

The in operator returns True if the key appears in the dictionary and False otherwise:  

>>> 'pears' in inventory  

True  

>>> 'blueberries' in inventory  

False  

This operator can be very useful, since looking up a non-existant key in a dictionary causes a runtime error:  

>>> inventory['blueberries']  

Traceback (most recent call last):  

File "", line 1, in <module>  

KeyError: 'blueberries'  

>>>  

3. Use maketrans and translate functions to replace commas with spaces  

text = text. translate(string. maketrans("",""), string. punctuation)  

4. Use split function to split the timings into individual elements of a list  

>>> Athlete. split(",")  

split reverses by splitting a string into a multi-element list. Note that the delimiter (“,”) is stripped out completely; it does not appear in any of the elements of the returned list.  

5. Perform necessary calculations to display min, max, and avg timings of each athlete  

_min = None  

_max = None  

_sum = 0  

_len = 0  

with open('Athlete .txt') as  ff:  

for line in ff:  

val = int(line. strip())  

if _min is None or val < _min:  

_min = val  

if _max is None or val > _max:  

_max = val  

_sum += val  

_len += 1  

_avg = float(_sum) / _len  

# Print output  

print("Min: %s" % _min)  

print("Max: %s" % _max)  

print("Avg: %s" % _avg)  

for index, row in enumerate(rows):  

print "In row %s, Avg = %s, Min = %s" % (index, Avg(row), min(row))  

for index, column in enumerate(columns):  

print "In column %s, Avg = %s, Min = %s" % (index, Avg(column), min(column))  

In class Assignment Setup of Production FacilityJobs Description Duration/ Weeks Predecessors1 Design production tooling 4 - 2 Prepare manufacturing drawings 6 - 3 Prepare production facility 10 - 4 Procure tooling 12 1 5 Procure production parts 10 2 6 Kit parts 2 3,4,5 7 Install tools 4 3,4 8 Testing 2 6,7 1. Draw the network diagram2. What is the critical path

Answers

Answer:

See explaination

Explanation:

Critical path method (CPM) is a step-by-step process by which critical and non-critical tasks are defined so that time-frame problems and process bottlenecks are prevented.

please see attachment for the step by step solution of the given problem.

One author states that Web-based software is more likely to take advantage of social networking (Web 2.0) approaches such as wikis and blogs. If this is the case, can we expect more social networking capabilities in all future software? Aside from LinkedIn, how can social media be leveraged by CIT graduates?

Answers

Answer:

Yes

Explanation:

I will say Yes. There are very much limitless possible and future we can expect from social media and even more from social networking. Its capabilities from upcoming software in the future. Since the Internet is in its early days of growing and cloud computing being introduced there are way more possibilities in the future.

Social media can be duely applied by CIT (Computer Information Technologies) graduates. It can be used to improve them in their career and also will helps them connect professionally. Quora is one such platform which is not exactly like LinkedIn but pretty much serves the purpose.

Which field in a Transmission Control Protocol header provides the next expected segment?

Answers

Answer:

Acknowledgement number

Explanation:

The Acknowledgement number field provides the next expected segment.

TCP packets can contain an acknowledgement, which is the sequence number of the next byte the sender expects to receive this also is an acknowledgement of receiving all bytes prior to that.

Write a function that takes as input an English sentence (a string) and prints the total number of vowels and the total number of consonants in the sentence. The function returns nothing. Note that the sentence could have special characters like dots, dashes, and so on.

Answers

Answer:

   public static void vowelCount(String word){

       int vowelCount =0;

       int consonantCount =0;

       int wordLen = word.length();

       //a,e,i,o,u

       for(int i=0; i<word.length(); i++){

           if(word.charAt(i)=='a'||word.charAt(i)=='e'||word.charAt(i)=='i'

                   ||word.charAt(i)=='o'||word.charAt(i)=='u'){

               vowelCount++;

           }

       }

       System.out.println("Number of Vowels: "+vowelCount);

       System.out.println("Number of Consonants: "+ (wordLen-vowelCount));

   }

Explanation:

The method vowelCount is implemented in Java

Receives a string as argument

Uses a for loop to iterate the entire string

Uses an if statement to check for vowels

Substract total vowels from the length of the string to get the consonants

See complete code with a main method below:

import java.util.Scanner;

public class num2 {

   public static void main(String[] args) {

   Scanner in = new Scanner(System.in);

       System.out.println("Enter a String");

       String word = in.nextLine();

       //Removing all special characters and whitespaces

       String cleanWord = word.replaceAll("[^a-zA-Z0-9]", "");

//Calling the Method        

vowelCount(cleanWord);

   }

//The method

   public static void vowelCount(String word){

       int vowelCount =0;

       int consonantCount =0;

       int wordLen = word.length();

       //a,e,i,o,u

       for(int i=0; i<word.length(); i++){

           if(word.charAt(i)=='a'||word.charAt(i)=='e'||word.charAt(i)=='i'

                   ||word.charAt(i)=='o'||word.charAt(i)=='u'){

               vowelCount++;

           }

       }

       System.out.println("Number of Vowels: "+vowelCount);

       System.out.println("Number of Consonants: "+ (wordLen-vowelCount));

   }

}

To count the number of vowels and consonants in an English sentence, you could write a function that iterates through each character in the string, checks whether it is a vowel or a consonant, and updates a count for each. Vowels are a, e, i, o, and sometimes u and y. The function disregards any non-alphabetic characters and returns nothing.

To write this function in Python, for example, you could create a list of vowels, iterate through each letter in the input string, and increment the corresponding count if the letter is a vowel or consonant. Python's str.isalpha() method can determine if a character is a letter, thus ignoring special characters and whitespaces. Note that the function should handle both uppercase and lowercase letters since English is case-insensitive while counting vowels and consonants. This function not only serves a practical coding challenge, but it also incorporates an understanding of the English language and its phonetic components.

[Submit on zyLabs] Please write a function with one input, a matrix, and one output, a matrix of the same size. The output matrix should be the input matrix mirrored on the vertical axis. For instance, theinput:[123456789]Would become: [321654987]And the input:[112221112212]Would become:[221112221121]Note that this functions slightly differently for inputs with odd and even numbers of columns. For an odd number of columns, your centermost column stays the same. For an even number of columns, all columns are moved in the resulting output. You can use the function[yDim, xDim]

Answers

Answer:

See explaination for the details.

Explanation:

% Matlab file calculateMirrorMatrix.m

% Matlab function to return a matrix which should be input matrix mirrored

% on the vertical axis

% input is a matrix

% output is a matrix of same size as input matrix

function [mirrorMatrix] = calculateMirrorMatrix(inputMatrix)

mirrorMatrix = zeros(size(inputMatrix)); % create output matrix mirrorMatrix of same size as inputMatrix

fprintf('\n Input Matrix :\n');

disp(inputMatrix); % display the input matrix

[row,col] = size(inputMatrix); % row, col contains number of rows and columns of the inputMatrix

% loop to find the matrix which should be input matrix mirrored

for i = 1:row

mirrorIndex =1;

for j = col:-1:1

mirrorMatrix(i,mirrorIndex)=inputMatrix(i,j);

mirrorIndex=mirrorIndex + 1;

end

end

end

% end of matlab function

Please kindly check attachment for its output.

The function 'mirror_matrix' takes a matrix and returns a new matrix where the columns are reversed. It handles matrices with both odd and even numbers of columns. This solution ensures accurate vertical mirroring of the input matrix.

Mirroring a Matrix on the Vertical Axis

To solve the problem of mirroring a matrix on the vertical axis, we need to create a function that takes an input matrix and outputs a matrix of the same size where the columns are reversed.

Here's a step-by-step explanation:

Matrix Dimensions: Determine the dimensions of the matrix with variables yDim (number of rows) and xDim (number of columns).Initialize Output Matrix: Create an empty matrix of the same size as the input matrix.Reverse Columns: Iterate through each row of the matrix and assign the elements to the new positions in the output matrix such that the columns are reversed.

Here's a sample Python function to achieve this:

def mirror_matrix(matrix):
   yDim = len(matrix)
   xDim = len(matrix[0])
   output_matrix = [ ]
   for row in matrix:
       new_row = row[::-1]
       output_matrix.append(new_row)
   return output_matrix

For example, an input matrix:

[[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]

would result in:

[[3, 2, 1],
[6, 5, 4],
[9, 8, 7]]

This solution ensures that the output matrix is mirrored correctly on the vertical axis.

Which of the following statements correctly describe a computer program?
A. It is a robust way to find information
B. It is a set of step by step instructions called coding
C. It is a way to take apart a computer

Answers

Answer: A. It’s a robust way to find information

Explanation:

Hope this help.

Answer:

A. It is a robust way to find information

Explanation:

eh

Lab Assignment 3 Phase 1 Create a class named Car, which is supposed to represent cars within a Java program. The following are the attributes of a typical car: - year which indicates the year in which the car was made. - price indicating the price of the car The year attribute is an integer, whereas the price is a double value. The year can only lie between 1970 and 2011. The price can be any value between 0 and 100000. The class Car should be constructed in such a way that any attempt to place an invalid value in the year and/or price, will result in the attribute being set to its lowest possible value. Create the class, which contains the necessary attributes and setter/getter methods: setYear( ), getYear( ), setPrice( ) and getPrice( ). Test all of its public members, which in this case only represents the setter/getter methods. The instructor will provide his/her own testing code to verify that the class is functioning properly

Answers

Answer:

Check the explanation

Explanation:

Car.java

//class Car

public class Car {

  //private variable declarations

  private int year;

  private double price;

  //getYear method

  public int getYear() {

      return year;

  }

  //setYear method

  public void setYear(int year) throws CarException {

      //check for the year is in the given range

      if(year>=1970&&year<=2011)

          this.year = year;

      //else throw an exception of type CarException

      else

          throw new CarException("Invalid Year");

  }

  //getPrice method

  public double getPrice() {

      return price;

  }

  //setPrice method

  public void setPrice(double price) throws CarException {

      //check for the price is in the given range

      if(price>=0&&price<=100000)

          this.price = price;

      //else throw an exception of type CarException

      else

          throw new CarException("Invalid Price");

  }

  //default constructor to set default values

  public Car(){

      this.year=1970;

      this.price=0;

  }

  //overloaded constructor

  public Car(int year, double price) {

      //check for the year is in the given range

      if(year>=1970&&year<=2011)

          this.year = year;

      //else initialize with default value

      else

          this.year=1970;

      //check for the price is in the given range

      if(price>=0&&price<=100000)

          this.price = price;

      //else initialize with default value

      else

          this.price=0;

     

  }

  //copy constructor

  public Car(Car c){

      this.year=c.year;

      this.price=c.price;

  }

  //toString method in the given format

  public String toString() {

      return "[Year:" + year + ",Price:" + (int)price + "]";

  }

  //finalize method

  public void finalize(){

      System.out.println("The finalize method called.");

  }

  public static void main(String args[]) throws CarException{

      Car a=new Car();

      System.out.println(a.toString());

      Car b=new Car(1986,25000.98);

      System.out.println(b.toString());

      Car c=new Car();

      c.setYear(1900);

      c.setPrice(23000);

      System.out.println(c.toString());

      Car d=new Car();

      d.setYear(2000);

      d.setPrice(320000);

      System.out.println(d.toString());

  }

}

CarException.java

//exception class declaration

public class CarException extends Exception{

  //private variable declaration

  private String message;

  //constructor

  public CarException(String message) {

      super();

      this.message = message;

  }

  //return error message

  public String getMessage(){

      return message;

  }

 

}

java


This lab is intended to give you practice creating a class with
a constructor method, accessor methods, mutator methods, equals
method , toString method and a equals method.

In this lab you need to create two separate classes, one Student class and other Lab10 class.
You need to define your instance variables, accessor methods, mutator methods, constructor,
toString method and equals method in Student class.

You need to create objects in Lab10 class which will have your main method and need to add various
functionalities so that you can get the output as shown in sample output.

// Name:
// Section:

// Lab 10
// CS1113
// Fall 2016
// Class Lab10


public class Lab10
{
//Constants
private final static String NAME = "YOUR NAME"; // replace YOUR NAME with your name
private final static int STUID = 123456789;
private final static double GPA1 = 4.00;
private final static double GPA2 = 2.34;

//main method
public static void main (String[] args)
{
Student stu1;

stu1 = new Student(NAME, STUID, GPA1);

System.out.println("\nName: " + stu1.getName());
System.out.println("Id Number: " + stu1.getIdNum());
System.out.println("GPA : " + stu1.getGPA());
stu1.setGPA(GPA2);
System.out.println(stu1 + "\n");

// Create a second student object
// With a name of Trine Thunder, a
// gpa of 4.00, and a student Id of
// 000000001
// You do not need to declare these at final constants,
// but you can if you want to.

// [Add code here]

// Print out this student similar to above.
// You do not need to reset the gpa of this student.

// [Add code here]

// Check if both objects are same using == and .equals() methods.
// Print the message in both cases, whether same or not as shown in sample output.

// [Add code here]

} // end of main
} // end of class Lab10


// Name:
// Section:

// Lab 10
// CS1113
// Fall 2016
// Class : Student.java

public class Student
{
//class variables
private String name;
private int idNum;
private double gpa;

// Constructor
public Student(String namePar, int idNumPar, double gpaPar)
{
// Save namePar to class variable name

// [Add code here]

// Save idNumPar to class variable idNum

// [Add code here]

// Save gpaPar to class variable gpa

// [Add code here]

}

// Accessor: returns name of student
public String getName()
{
// Return the name of the student

// [Add code here]
}

// Accessor: returns GPA of student
public double getGPA()
{
// Return the gpa of the student

// [Add code here]
}

// Accessor: returns idNum of student
public int getIdNum()
{
// Return the idnum of the Student

// [Add code here]
}


// Mutator: Changes the GPA of the student
public void setGPA(double g)
{
// Set the class variable gpa equal to g

// [Add code here]
}

// toString method: Returns a formatted string
// of student information.
// As shown in sample output.
public String toString()
{
// declare a String variable to store the string value
// then return the formatted String.

// [Add code here]
}

// implement .equals() method which returns a boolean value
// of student information. When you call this method,
// it should print message as shown in sample output.
public boolean equals(Student s)
{
//[Add code here]
}
} // end of class Student


1) Fill in the needed code in the file (class)
Student.java (Student) and Lab10.java.
The program will not compile until you do so.
You will have 2 files, one named Lab10.java
and one named Student.java.

Compile the subsidiary class, Student.java,
first, using

javac Student.java

Once you have eliminated any and all syntax errors
in the student class. Then compile

javac Lab10.java

and eliminate any syntax errors from that class.
Then you can run the program using

java Lab10

2) Run the program and redirect the output to Lab10_out.txt

A Sample output is below:

Name: John Terry
Id Number: 123456789
GPA : 4.0
Student Name: John Terry
Student Id num:123456789
Student GPA: 2.34


Name: Trine Thunder
Id Number: 1
GPA : 4.0
Student Name: Trine Thunder
Student Id num:1
Student GPA: 4.0

Using == .....
Both are different.

Using .equals() method.....
Both are different.

3) Now change your code so that you pass same values for both stu1 and stu2.
Compile and run your program.
Your output should look like:

Name: John Terry
Id Number: 123456789
GPA : 4.0
Student Name: John Terry
Student Id num:123456789
Student GPA: 2.34


Name: Trine Thunder
Id Number: 1
GPA : 4.0
Student Name: Trine Thunder
Student Id num:1
Student GPA: 4.0

Using == .....
Both are different.

Using .equals() method.....
Both are different.

Explain why the result is not as expected?

Revert back to your previous version of your java code.

4) Turn in a printed copy of both Student.java and Lab10.java. Also
turn in a printed copy of your output file created in step 2.

Answers

Answer:

public class Lab10

{

//Constants

private final static String NAME = "John Terry"; // replace YOUR NAME with your name

private final static int STUID = 123456789;

private final static double GPA1 = 4.00;

private final static double GPA2 = 2.34;

//main method

public static void main (String[] args)

{

Student stu1;

stu1 = new Student(NAME, STUID, GPA1);

System.out.println("\nName: " + stu1.getName());

System.out.println("Id Number: " + stu1.getIdNum());

System.out.println("GPA : " + stu1.getGPA());

stu1.setGPA(GPA2);

System.out.println(stu1 + "\n");

// Create a second student object

// With a name of Trine Thunder, a

// gpa of 4.00, and a student Id of

// 000000001

// You do not need to declare these at final constants,

// but you can if you want to.

System.out.println("\nName: Trine Thunder" );

System.out.println("Id Number: 000000001");

System.out.println("GPA : 4.00");

Student stu2 = new Student("Trine Thunder",000000001, 4.00 );

// [Add code here]

// Print out this student similar to above.

// You do not need to reset the gpa of this student.

System.out.println(stu2 + "\n");

// [Add code here]

// Check if both objects are same using == and .equals() methods.

// Print the message in both cases, whether same or not as shown in sample output.

System.out.println("Using ==");

if(stu1 == stu2){

System.out.println("Both are same");

}

else{

System.out.println("Both are different");

}

stu1.equals(stu2);

// [Add code here]

} // end of main

} // end of class Lab10

// Name:

// Section:

// Lab 10

// CS1113

// Fall 2016

// Class : Student.java

public class Student

{

//class variables

private String name;

private int idNum;

private double gpa;

// Constructor

public Student(String namePar, int idNumPar, double gpaPar)

{

// Save namePar to class variable name

name = namePar;

// [Add code here]

idNum = idNumPar;

// Save idNumPar to class variable idNum

gpa = gpaPar ;

// [Add code here]

// Save gpaPar to class variable gpa

// [Add code here]

}

// Accessor: returns name of student

public String getName()

{

// Return the name of the student

return name;

// [Add code here]

}

// Accessor: returns GPA of student

public double getGPA()

{

// Return the gpa of the student

return gpa;

// [Add code here]

}

// Accessor: returns idNum of student

public int getIdNum()

{

// Return the idnum of the Student

return idNum;

// [Add code here]

}

// Mutator: Changes the GPA of the student

public void setGPA(double g)

{

// Set the class variable gpa equal to g

gpa = g;

// [Add code here]

}

// toString method: Returns a formatted string

// of student information.

// As shown in sample output.

public String toString()

{

// declare a String variable to store the string value

// then return the formatted String.

String s ="";

s = s + "Student Name: "+name+"\n";

s =s + "Student Id num: "+idNum+"\n";

s =s + "Student GPA: "+gpa+"\n";

return s;

// [Add code here]

}

// implement .equals() method which returns a boolean value

// of student information. When you call this method,

// it should print message as shown in sample output.

public boolean equals(Student s)

{

//[Add code here]

System.out.println("Using .equals() method");

if(this.equals(s.idNum == this.idNum)){

System.out.println("Both are same");

return true;

}

else{

System.out.println("Both are different");

return false;

}

}

} // end of class Student

Explanation:

Output:

Name: John Terry

Id Number: 123456789

GPA : 4.0

Student Name: John Terry

Student Id num: 123456789

Student GPA: 2.34

Name: Trine Thunder

Id Number: 000000001

GPA : 4.00

Student Name: Trine Thunder

Student Id num: 1

Student GPA: 4.0

Using ==

Both are different

Using .equals() method

Both are different

5.11 Of these two types of programs:a. I/O-boundb. CPU-boundwhich is more likely to have voluntary context switches, and which is more likely to have nonvoluntary context switches? Explain your answer

Answers

Answer:

The answer is "both voluntary and non-voluntary context switch".

Explanation:

The description to this question can be described as follows:

Whenever processing requires resource for participant contextual switch, it is used if it is more in the situation of I/O tied. In which semi-voluntary background change can be used when time slice ends or even when processes of greater priority enter.

In option a, It requires voluntary context switches in I /O bound.In option b, it requires a non-voluntary context switch for CPU bound.

Consider an unpipelined or single-stage processor design like the one discussed in slide 6 of lecture 17. At the start of a cycle, a new instruction enters the processor and is processed completely within a single cycle. It takes 2,000 ps to navigate all the circuits in a cycle (including latch overheads). Therefore, for this design to work, the cycle time has to be at least 2,000 pico seconds. What is the clock speed of this processor? (5 points) What is the CPI of this processor, assuming that every load/store instruction finds its instruction/data in the instruction or data cache? (5 points) What is the throughput of this processor (in billion instructions per second)? (10 points)

Answers

Answer:

a. Clock Speed of Processor = 0.5 GHz

b. Cycles per Instruction (CPI) = 1 Clock per Instruction

c. Throughput = 1 billion Instruction per Second

Explanation

Given Data

Time Take to complete the single Cycle = 2000ps = 2000 x 10⁻¹²

To Find

a. Clock Speed of Processor = ?

b. Cycles per Instruction (CPI) = ?

c. Throughput = ?

Solution:

a. Clock Speed of Processor = ?

Clock Speed = 1/Time to complete the cycle

                      = 1/2000 x 10⁻¹²  Hz

                      =  0.0005 x 10¹²  Hz

                      =  0.5 x 10⁹  Hz                             as   10⁹ = 1 Giga   so,

                      = 0.5 GHz

b. Cycles per Instruction (CPI) = ?

It is mentioned that, each instruction should start at the start of the new cycle and completely processed at the end of that cycle so, we can say that Cycles per Instruction (CPI) = 1

for above mentioned processor.

c. Throughput = ?

Throughput = CPI x Clock Speed

where

CPI = 1 cycle per instruction

Clock Speed = 1 billion Instructions per Second

as

Clock Speed = 1 billion Cycles per Second

Throughput = 1 cycle per instruction x 1 billion Cycles per Second

Throughput = 1 billion Instruction per Second

                         

In previous counters that you have created, you set the upper limit as the value just past the last digit you wanted displayed. That is not the case with this design. Why is how you set the range different for this design?

Answers

Answer:

The Synchronous load is synchronous and the Asynchronous load input is delayed with the counter pulse by one when it counts up.

Explanation:

The Synchronous load is synchronous and when it goes through the input load then the count from the Q outputs will stay the same. The Asynchromous load input is bit different and it delays the counters pulse by one when it counts up. it adds 1 to the pulse when it counts down. This means that it will either add or subtract 1 to the restart/maximum binary count.

Final answer:

The number of digits displayed in calculations holds significance for accuracy and precision.

Explanation:

When working with numbers, the number of **digits** you decide to display or consider is crucial. It is essential to be aware of the **accuracy**, **precision**, and **significant figures** in your calculations.

In terms of displayed values, setting the range differently in certain designs may be to highlight the **significance** of the last digit. This last digit often indicates the level of **error** in the calculation and is crucial for conveying the **precision** of the result. The question posed relates to the design of counters in engineering and why the range setting differs in the given design compared to previous ones. In engineering designs, especially those involving counters that detect voltage changes and display them, the precision of measurement and display is crucial. The decision on how to set the range, or the number of digits displayed, is influenced by the principles of accuracy, precision, and significant figures

A _________ does not act like a computer virus, instead it consumes bandwidth, processor, and memory resources slowing down your system

Answers

Answer:

The correct answer to the following question will be "Worms".

Explanation:

Worms represent malicious programs that repeatedly render variations of themselves on a shared drive, networking shares respectively. The worm's aim is to replicate itself over and over again.

It doesn't function like a piece of malware but uses bandwidth, CPU, as well as storage assets that slow the machine down.It requires a lot of additional storage throughout the drive because of its duplication nature or requires further CPU uses which would in effect make the device too sluggish and thus requires more bandwidth utilization.

Assume that two computers are directly connected by a very short link with a bandwidth of 125 Mbps. One computer sends a packet of 1000 Bytes to the other computer. What’s the end-to-end delay (ignoring the propagation delay)?

Answers

Answer:

End to End Delay = 64 micro second

Explanation:

Given

Bandwidth = 125Mbps

A packet = 1000 bytes

Converting bandwidth from Mbps to bit/s

Bandwidth = 125* 10^6 bits/s

Bandwidth = 125,000,000 bit/s

End to End delay is calculated as

Length of Packet ÷ Bandwidth

Length of Packet = 1,000 byte --- convert to bits

Length of Packet = 1000 * 8

Length of Packet = 8,000 bits

So, End to End delay = 8,000/125,000,000

End to End Delay = 0.0000064 seconds --- convert to micro second

End to End Delay = 64 micro second

Write two Get statements to get input values into first Month and first Year. Then write three Put statements to output the month, a slash, and the year. Ex: If the input is 1 2000, the output is:

Answers

Answer:

// Scanner class is imported

import java.util.Scanner;

// InputExample class to hold the program

public class InputExample {

// main method to begin program execution

public static void main(String args[]) {

// Scanner object scnr is created

Scanner scnr = new Scanner(System.in);

// variable birthMonth is declared

int birthMonth;

// variable birthYear is declared

int birthYear;

// birthMonth is initialized to 1

birthMonth = 1;

// birthYear is initialized to 2000

birthYear = 2000;

// birthday is displayed

System.out.println("1/2000");

// prompt is displayed asking user to enter birthMonth

System.out.println("Enter birthMonth:");

// birthMonth is received using Scanner object

birthMonth = scnr.nextInt();

// prompt is displayed asking user to enter birthYear

System.out.println("Enter birthYear:");

// birthYear is received using Scanner object

birthYear = scnr.nextInt();

// the birthday format is displayed

System.out.println(birthMonth + "/" + birthYear);

}

}

Explanation:

The program is written in Java as required and it is well commented.

An image depicting the full question is attached.

Other Questions
Is 0.1234 rational or irrational (Viewpoint 1) Vaccines: A Necessity for a Healthy Societyby Tom CottermanParents have a lot to be concerned about today. They carefully supervise time spent in front of the television or at the computer and shuttle children between school and extracurricular activities. One thing parents should not be worried about is vaccinating their kids; still, the debate rages on.A growing number of parents are choosing not to vaccinate their children. While there are legitimate reasons not to vaccinate, including certain medical conditions that compromise immune systems, many parents are objecting to vaccination shots for philosophical reasons. The real culprit undermining the publics safety is a baseless claim that vaccinations lead to autism.Autism is a complex developmental disorder with no known cause or cure. Symptoms usually present themselves before the age of three. Proponents of the autism-vaccine link argue that the fact that many autism diagnoses occur during the time many toddlers receive their first immunizations is more than just coincidence. The Centers for Disease Control found that there is no link between vaccines and autism. The recent rise in autism is scary, but blaming vaccines shifts the focus away from finding the true cause of this disease.Parents put their children in serious danger by not immunizing. The diseases we immunize against are not gone and they are still deadly. Even chicken pox, a seemingly innocent disease, can kill. Choosing not to immunize endangers sick children and infants who cannot receive shots. It also undermines the community immunity. Unvaccinated individuals make it easier for diseases to spread.Vaccination should not be a choice, but more states are passing laws that allow parents to send their children to school without their shots. Vaccines are not perfect; there is always some risk. But the risk is negligible when we consider the threat an unvaccinated society presents to us all.(Viewpoint 2) Vaccines: A Parents Right to Chooseby: Janice RowkerDeciding whether or not to vaccinate your children is a very personal and difficult decision. This is the reason more states are allowing exemptions from vaccinations. While no one questions that vaccines have saved countless lives, the alarming rise of diseases like autism and asthma over the past several decades have forced parents to examine what goes into their childrens bodies.The ingredients in vaccines are shocking. Besides the bacteria that supposedly build up a childs immunity to disease, many vaccines also contain aluminum, monosodium glutamate or MSG, and formaldehyde. That last ingredient is a known carcinogen. Can you imagine injecting a healthy newborn with a known cancer-causing agent?Most people received vaccinations as children and led healthy lives, so they do not understand how their children could be in danger. The truth is children today receive more vaccine doses than we did when we were young. Do you remember getting the chicken pox? Today, we vaccinate kids against this common childhood disease. While the chicken pox is not fun, there is no reason to immunize a child against it. After having the chicken pox, your body builds up a natural immunity to it. As a parent, I know that I do not want unnatural chemicals in my childrens bodies.Physicians and government officials argue that parents who dont vaccinate are putting their communities at risk. They attempt to scare us into conforming by reminding us of the polio outbreaks of the 1900s. The chances of a child contracting polio are slim, but the Centers for Disease Control reported that doctors diagnose 1 in 150 children with autism each year. This is a gamble many parents arent willing to take. Though we care about our communities, our childrens health and safety will and must always come first.9) The main purpose of this information isA)to show how concerned parents are about their children.B)to show the link between childhood vaccines and autism.C)to encourage parents to make wise decisions concerning their children.D)to present both sides of the argument about the vaccination of children.10)Although the two passages express opposing views, they both talk about how vaccinations affect community health. Which of the choices has a logical conclusion drawn from the two articles?A)People should begin to question the value of medical research.B)Polio might return to America if all children are not vaccinated.C)People who don't vaccinate their children don't care about their communities.D)People need to decide whether community or individual health is more important. what is the length of a car if the length on the scale model car is 17 cm and the scale is 2 cm : 50 cm?A. 4.25 cmB. 425 cmC. 680 cmD. 850 cmE. 1700 cm 8. Write the number in expanded form.674.281 Adding new channels in a multichannel distribution system provides the following advantage. It reduces marketing expenses. It expands market and sales coverage. It limits market complexity. It reduces system controls. Please Help I mark Brainlest If anyone Knows the answer What are the 5 components of health related fitness? Select the sentence which has corrected the double negative accurately in the following sentence. We haven't been to no ball games in over a month. We have been to many ball games over the month. We haven't been to any ball games in over a month. The sentence contains no double negative. Joseph and Wilson each started out at their own houses and are biking towards each other. Joseph started out first, and has already gone 10 kilometers. He bikes at a constant speed of 7 kilometers per hour. Wilson just left, and rides at 9 kilometers per hour. When the boys meet halfway between their houses, they will continue to the park together. How far will each boy have ridden to meet the other halfway? How long will that take? Can I please have help with this question? The height and weight of several adults were recorded:Height (ft)4.655.155.65.856.26.35Weight (lbs)95.9118141151167186It was discovered that this can be modeled by the equationy = 50.2x140 where x is height in feet and y is weight in pounds.What height corresponds to a weight of 130 pounds? Round to the nearest hundredth. A 6.25 ft B 5.85 ft C 6.68ft D 5.38 FT 11. What language are most genus and species names? 0.694 rounded to the nearest hundredth is Which best describes how parents affect the genotype of a child?A.The parents choose whether to educate their child.B.The parents decide what to feed their child.C.The parents pass along genes to the child.D.The parents allow their child to stay up late. A chemist places 10.0 grams of dry ice (CO 2 ) in a 2.5 L vacuum at 25C.After it all sublimates, what would be the pressure inside the container? Now, read another secondary source, and then answer the question. Provision means condition. Compulsory means required. Corporal punishment means physical punishment. According to the codes, what were freed African Americans required to do? A synonym for pause is _____. yield accent wait Angle C is inscribed in circle O.AB is a diameter of circle O.What is the measure of angle B? Two balls of the same shape and size have charges of +8 and-2. The balls are brought together, allowed to touch, and then separated. What is the net charge on each ball now? Suppose the restaurant industry is perfectly competitive. All producers have identical cost curves and the industry is currently in long-run equilibrium, with each producer producing at its minimum long-run average total cost of $8. a. If there is a sudden increase in demand for restaurant meals, what will happen to the price of a restaurant meal? How will individual firms respond to the change in price? Will there be entry or exit from the industry? Explain. b. In the market as a whole, will the change in the equilibrium quantity be greater in the short-run or the long-run? Explain. c. Will the change in output on the part of individual firms be greater in the short-run or the long- run? Explain and reconcile your answer to part (b).