Assume hosts A and B are each connected to a switch Svia 100-Mbps links. The propagation delay on each link is 25μs. The switch Sis a store-and-forward device and it requires a delay of 35μs to process a packet after is has received the last bit in the packet. Calculate the total time required to transmit 40,000 bits from Ato B in the following scenarios. (The total time is measured from the start of the transmission of the first bit at A, until the last bit is received at B. We always assume that links are bi-directional with the same transmission rate and propagation delay in each direction unless specifically instructed otherwise.)

Answers

Answer 1

Answer:

885 μs

Explanation:

Given that:

Switch via = 100 Mbps links

The propagation delay for each link = 25μs.

Retransmitting a received packet = 35μs

To determine:

The total time required to transmit 40,000 bits from A to B.

Considering the fact as a single packet:

Transmit Delay / link = size/bandwith

= 4×10⁴ bits / 100 × 10⁶ bits/sec

= 400 μs

The total transmission time = ( 2 × 400 + 2 × 25 + 35) μs

= (800 + 50 + 35) μs

= 885 μs


Related Questions

python program A year with 366 days is called a leap year. Leap years are necessary to keep the calendar in sync with the sun, because the earth revolves around the sun once very 365.25 days. As a result, years that are divisible by 4, like 1996, are leap years. However, years that are divisible by 100, like 1900, are not leap years. But years that are divisible by 400, like 2000, are leap years. Write a program named leap_year.py that asks the user for a year and computes whether that year is a leap year

Answers

Answer:

In Python:

year = int(input("Year: "))

if (year % 4) == 0:

  if (year % 100) == 0:

      if (year % 400) == 0:

          print("Leap year")

      else:

          print("Not a leap year")

  else:

      print("Leap year")

else:

  print("Not a leap year")

Explanation:

This line prompts user for year

year = int(input("Year: "))

This condition checks if input year is divisible by 4

if (year % 4) == 0:

If yes, this condition checks if input year is divisible by 100

  if (year % 100) == 0:

If yes, this condition checks if input year is divisible by 400

      if (year % 400) == 0:

If divisible by 4, 100 and 400, then it is a leap year

          print("Leap year")

      else:

If divisible by 4 and 100 but not 400, then it is not a leap year

          print("Not a leap year")

  else:

If divisible by 4 but not 100, then it is a leap year

      print("Leap year")

else:

If it is not divisible by, then it is not a leap year

  print("Not a leap year")

Write a program that prompts the user to enter a fraction in the following format (x/y). You may assume that the user will input numbers and a slash, but your program should deal with spaces. Use String methods to parse out the numerator and denominator (e.g. indexOf(), trim(), substring() etc.) Once you have the numerator and denominator, your program will determine whether the number is a proper fraction or an improper fraction. If it is a proper fraction, display the number. If not, reduce it to a mixed fraction or to an integer (see sample output below).

Answers

Answer:

fraction = input("enter fraction x/y: ")

if len(fraction) == 3:

   if fraction[1] == "/":

       try:

           num = int(fraction[0])

           den = int(fraction[2])

           if num < den:

               print(f"{num}/{den} is a proper fraction")

           else:

               if num% den == 0

                   print(f"{num}/{den} is an improper fraction and can be reduced to {num/den}")

               else:

                   print(f"{num}/{den} is an improper fraction and can be reduced to {num//den} + {num - (den * (num//den))}/{den}")

       except ValueError:

           print("numerator and denominator must be integer numbers")

Explanation:

The try and except statement of the python program is used to catch value error of the input fraction of values that are not number digits. The program converts the numerator and denominator string values to integers and checks for the larger value of both.

The program prints the fraction as a proper fraction if the numerator is lesser and improper if not.

A structure that organizes data in a list that is commonly 1-dimensional or 2-
dimensional
Linear Section
Constant
No answertet provided
It intro technology

Answers

Answer:

An array.

Explanation:

An array can be defined as a structure that organizes data in a list that is commonly 1-dimensional or 2-dimensional.

Simply stated, an array refers to a set of memory locations (data structure) that comprises of a group of elements with each memory location sharing the same name. Therefore, the elements contained in array are all of the same data type e.g strings or integers.

Basically, in computer programming, arrays are typically used by software developers to organize data, in order to search or sort them.

Binary search is an efficient algorithm used to find an item from a sorted list of items by using the run-time complexity of Ο(log n), where n is total number of elements. Binary search applies the principles of divide and conquer.

In order to do a binary search on an array, the array must first be sorted in an ascending order.

Hence, array elements are mainly stored in contiguous memory locations on computer.

(1) Prompt the user for an automobile service. Output the user's input. (1 pt) Ex: Enter desired auto service: Oil change You entered: Oil change (2) Output the price of the requested service. (4 pts) Ex: Enter desired auto service: Oil change You entered: Oil change Cost of oil change: $35 The program should support the following services (all integers): Oil change -- $35 Tire rotation -- $19 Car wash -- $7 If the user enters a service that is not l

Answers

Answer:

In Python:

#1

service = input("Enter desired auto service: ")

print("You entered: "+service)

#2

if service.lower() == "oil change":

   print("Cost of oil change: $35")

elif service.lower() == "car wash":

   print("Cost of car wash: $7")

elif service.lower() == "tire rotation":

   print("Cost of tire rotation: $19")

else:

   print("Invalid Service")

Explanation:

First, we prompt the user for the auto service

service = input("Enter desired auto service: ")

Next, we print the service entered

print("You entered: "+service)

Next, we check if the service entered is available (irrespective of the sentence case used for input). If yes, the cost of the service is printed.

This is achieved using the following if conditions

For Oil Change

if service.lower() == "oil change":

   print("Cost of oil change: $35")

For Car wash

elif service.lower() == "car wash":

   print("Cost of car wash: $7")

For Tire rotation

elif service.lower() == "tire rotation":

   print("Cost of tire rotation: $19")

Any service different from the above three, is invalid

else:

   print("Invalid Service")

You do not really know that you have a hand. Here is why. Imagine the possibility in which you are only a handless brain floating in a vat, wired to a super computer that sends to your brain signals that perfectly simulate ordinary sensory experiences. Now, if you really know that you have a hand, you must be in a position to know that you are not such a handless brain in a vat. But are you in a position to know that

Answers

Answer:

If you do not know you are a brain in a vat, you do not have hands.

Explanation:

This premise is plausible as to understand the handless brain which is floating in a vat. The brain is connected to a super computer and it transmits messages to the brain. The brain receives those message and give signals to perform tasks.

You are considering upgrading memory on a laptop. What are three attributes of currently installed memory that HWiNFO can give to help you with this decision?

Answers

Answer:

Some of the qualities of the installed memory which HWiNFO can reveal are:

Date of manufactureMemory type Speed of memory

Explanation:

HWiNFO is an open-source systems information app/tool which Windows users can utilize as they best wish. It helps to detect information about the make-up of computers especially hardware.

If you used HWiNFO to diagnose the memory, the following information will be called up:

the total size of the memory and its current performance settingsthe size of each module, its manufacturer, and model Date of manufactureMemory type Speed of memorysupported burst lengths and module timings, write recovery time etc.

Cheers

What is block chain?

Answers

Answer:

Block Chain is a system of recording information that makes it difficult or impossible to change, hack, or cheat the system.

A blockchain is essentially a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems on the blockchain.

Hope this helps.

x

Blockchain is a distributed database existing on multiple computers at the same time. It is constantly growing as new sets of recordings, or ‘blocks’, are added to it. Each block contains a timestamp and a link to the previous block, so they actually form a chain. The database is not managed by any particular body; instead, everyone in the network gets a copy of the whole database. Old blocks are preserved forever and new blocks are added to the ledger irreversibly, making it impossible to manipulate by faking documents, transactions, and other information. All blocks are encrypted in a special way, so everyone can have access to all the information but only a user who owns a special cryptographic key is able to add a new record to a particular chain.

The Fast as Light Shipping company charges the following rates. Weight of the item being sent Rate per 100 Miles shipped 2kg or less. $0.25 Over than 2 kg but not more than 10 kg $0.30 Over 10 kg but not more than 20 kg. $0.45 Over 20 kg, but less than 50kg. $1.75 Write a program that asks for the weight of the package, and the distance to be sent. And then displays the charge.

Answers

Answer:

weight = float(input("Enter the weight of the package: "))

distance = float(input("Enter the distance to be sent: "))

weight_charge = 0

if weight <= 2:

   weight_charge = 0.25

elif 2 < weight <= 10:

   weight_charge = 0.3

elif 10 < weight <= 20:

   weight_charge = 0.45

elif 20 < weight <= 50:

   weight_charge = 1.75

if int(distance / 100) == distance / 100:

  d = int(distance / 100)

else:

   d = int(distance / 100) + 1

   

total_charge = d * weight_charge

print("The charge is $", total_charge)

Explanation:

*The code is in Python.

Ask the user to enter the weight and distance

Check the weight to calculate the weight_cost for 100 miles. If it is smaller than or equal to 2, set the weight_charge as 0.25. If it is greater than 2 and smaller than or equal to 10, set the weight_charge as 0.3. If it is greater than 10 and smaller than or equal to 20, set the weight_charge as 0.45. If it is greater than 20 and smaller than or equal to 50, set the weight_charge as 1.75

Since those charges are per 100 miles, you need to consider the distance to find the total_charge. If the int(distance / 100) is equal to (distance / 100), you set the d as int(distance / 100). Otherwise, you set the d as int(distance / 100) + 1. For example, if the distance is 400 miles, you need to multiply the weight_charge by 4, int(400/100) = 4. However, if the distance is 410, you get the int(400/100) = 4, and then add 1 to the d for the extra 10 miles.

Calculate the total_charge, multiply d by weight_charge

Print the total_charge

After separating from Mexico, Texas passed laws that made it harder for slave owners to _____________ slaves.
a.
emancipate
b.
own
c.
abuse
d.
sell

Answers

Answer: b.

Explanation:

Answer:

b

Explanation:

own slaves

A mysql prompt has been opened for you. Using the college database, complete the following tasks (use either a single-line or a multi-line SQL statement): Create a courses table with this definition (try using a multi-line SQL statement): --------- --------------------- ------ ----- --------- ---------------- | Field | Type | Null | Key | Default | Extra | --------- --------------------- ------ ----- --------- ---------------- | id | int(3) unsigned | NO | PRI | NULL | auto_increment | | title | varchar(255) | NO | UNI | NULL | | | credits | tinyint(2) unsigned | NO | | 1 | | --------- --------------------- ------ ----- --------- ---------------- Once you have completed these tasks press the Check It! button to have your solution assessed.

Answers

Answer:

See Explanation

Explanation:

Given

See attachment 1 for proper table definition

To answer this question, one of the basic sql commands (the "create" command) will be used to create the required table, followed by the fields of the table.

I could not submit my answer directly. So, I added two additional attachments which represent the answer section and the explanation section, respectively.

Modify the program you wrote for Chapter 6 Exercise 6 so it handles the following
exceptions:
• It should handle IOError exceptions that are raised when the file is opened
and data is read from it by printing "Trouble opening file. Try again." and
not executing any more of the code.
• It should handle any ValueError exceptions that are raised when the items
that are read from the file are converted to a number by printing "File must have
only numbers. Try again." and not executing any more of the code.
My code is as follows:
#try except
try:
#opening the file
read_file = open('numbers.txt', 'r')
#Store the numbers in the variable file_numbers.
file_numbers = read_file.read()
#close the file
read_file.close()
#Split the number of files in list_values.
list_values = file_numbers.split()
#how many numbers are there
list_length = len(list_values)
try:
#loop it up
for i in range(list_length):
list_values[i] = float(list_values[i])
#Add up all the numbers, put into list_sum
List_sum = sum(list_values)
#heres how we average it
Average_value = (List_sum)/list_length
#print
print(Average_value)
except ValueError:
print( "File must have only numbers. Try again." )
#handles IOError exceptions
except IOError:
#Display statement
print("Trouble opening file. Try again.")y:
#opening the file
read_file = open('numbers.txt', 'r')
#Store the numbers in the variable file_numbers.
file_numbers = read_file.read()
#close the file
read_file.close()
#Split the number of files in list_values.
list_values = file_numbers.split()
#how many numbers are there
list_length = len(list_values)
try:
#loop it up
for i in range(list_length):
list_values[i] = float(list_values[i])
#Add up all the numbers, put into list_sum
List_sum = sum(list_values)
#heres how we average it
Average_value = (List_sum)/list_length
#print
print(Average_value)
except ValueError:
print( "File must have only numbers. Try again." )
#handles IOError exceptions
except IOError:
#Display statement
print("Trouble opening file. Try again.")
This code will not print the average. Unsure why. The code functioned fine before the try,except lines were added in.

Answers

Answer:

#try except

try:

   #opening the file

   read_file = open('numbers.txt', 'r')

   #Store the numbers in the variable file_numbers.

   file_numbers = read_file.read()

   #close the file

   read_file.close()

   #Split the number of files in list_values.

   list_values = file_numbers.split()

   #how many numbers are there

   list_length = len(list_values)

   try:

       #loop it up

       for i in range(list_length):

           list_values[i] = float(list_values[i])

       #Add up all the numbers, put into list_sum

       List_sum = sum(list_values)

       #heres how we average it

       Average_value = (List_sum)/list_length

       #print

       print(Average_value)

   except ValueError:

       print( "File must have only numbers. Try again." )

   #handles IOError exceptions

except IOError:

   #Display statement

   print("Trouble opening file. Try again.")

Explanation:

The python program uses the try-except exception handling method to catch errors in the code. The IOError is used for catching input and output errors in the program like file handling while the ValueError keyword in the except statement is used to catch data type errors from a return statement, calculation or user input.

Assume for a given processor the CPI of arithmetic instructions is 2, the CPI of load/store instructions is 6, and the CPI of branch instructions is 3. Assume a program has the following instruction breakdowns: 240 million arithmetic instructions, 70 million load/store instructions, 100 million branch instructions. (a)Suppose we find a way to double the performance of the arithmetic instructions. What is the speedup of our machine

Answers

Answer:

The answer is below

Explanation:

Suppose that we find a way to double the performance of arithmetic instructions. What is the speedup of our machine? What if we find a way to improve the performance of arithmetic instructions by 10 times?

Solution:

a) number of clock cycles = (240 million * 2) + (70 million * 6) + (100 million * 3) = 1200 * 10⁶

If the performance of arithmetic instructions is doubled, the CPI of arithmetic instructions would be halved. Hence the CPI would be 1 (2 / 2). Therefore:

number of clock cycles = (240 million * 1) + (70 million * 6) + (100 million * 3) = 960 * 10⁶

Hence:

[tex]\frac{CPU\ time_c}{CPU\ time_A} =\frac{960*10^6}{1200*10^6}=0.8 \\\\[/tex]

Therefore they would be an increase of 20%

b) If the performance of arithmetic instructions is multiplied by 10, the CPI of arithmetic instructions would be halved. Hence the CPI would be 0.2 (2 / 10). Therefore:

number of clock cycles = (240 million * 0.2) + (70 million * 6) + (100 million * 3) = 768 * 10⁶

Hence:

[tex]\frac{CPU\ time_c}{CPU\ time_A} =\frac{768*10^6}{1200*10^6}=0.64 \\\\[/tex]

Therefore they would be an increase of 36%

Write a function sum_of_ends that takes a list of numbers as an input parameter and: if the list is empty, returns 0 if the list is not empty, returns the sum of the first element (at index 0) and the last element (at index length - 1) Note that for a list with only one element, the first element and the last element would be the same one element in the list and thus the function should return the sum of the element with itself. ex: If a

Answers

Answer:

Explanation:

The following code is written in Python. It creates the function called sum_of_ends and does exactly as the question asks, it sums the first and last elements of the array and returns it to the user, if the array is empty it will return 0.

def sum_of_ends(num_arr):

   if len(num_arr) == 0:

       return 0

   else:

       sum = num_arr[0] + num_arr[-1]

       return sum

Which is true regarding how methods work? Group of answer choices If a method returns a variable, the method stores the variable's value until the method is called again A return address indicates the value returned by the method After a method returns, its local variables keep their values, which serve as their initial values the next time the method is called A method's local variables are discarded upon a method's return; each new call creates new local variables in memory

Answers

Answer:

A method's local variables are discarded upon a method's return; each new call creates new local variables in memory.

Explanation:

A local variable can be defined as an argument passed to a function or a variable that is declared within a function and as such can only be used or accessed within the function.

This ultimately implies that, a local variable is effective whilst the function or block is being executed (active).

Basically, all local variables can only be a member of either the register storage, static or auto (dynamic) categories in computer programming.

The true statement regarding how methods work is that a method's local variables are discarded upon a method's return; each new call creates new local variables in memory. This is so because these local variables are only allocated a storage that is within the frame of the method which is being executed on the run-time stack and would be discarded upon a method's completion or return.

Statement that is true regarding how methods work is :A method's local variables are discarded upon a method's return; each new call creates new local variables in memory.

A local variable serves as a  variable which can be accessible within a particular part of a program.

These variables are usually defined  within that routine and it is regarded as been local to a subroutine.

We can conclude that in method's local variables it is possible for each new call creates new local variables in memory.

Learn more about method's local variables at:

https://brainly.com/question/19025168

For this lab, you will write a Java program to prompt the user to enter two integers. Your program will display a series of arithmetic operations using those two integers. Create a new Java program named Project01.java for this problem.
Sample Output: This is a sample transcript of what your program should do. Items in bold are user input and should not be put on the screen by your program. Make sure your output looks EXACTLY like the output below, including spacing. Items in bold are elements input by the user, not hard-coded into the program.
Enter the first number: 12
Enter the second number: 3
12 + 3 = 15
12 - 3 = 9
12 * 3 = 36
12 / 3 = 4
12 % 3 = 0
The average of your two numbers is: 7
A second run of your program with different inputs might look like this:
Enter the first number: -4
Enter the second number: 3
-4 + 3 = -1
-4 - 3 = -7
-4 * 3 = -12
-4 / 3 = -1
-4 % 3 = -1
The average of your two numbers is: 0
HINT: You can start by retyping the code that was given to you in Exercise 3 of ClosedLab01. That code takes in a single number and performs a few arithmetic operations on it. How can you modify that code to take in two numbers? How can you modify it to display "number * number =" instead of "Your number squared is: "? Take it step by step and change one thing at a time.
You can use the following as a template to get you started. Note that you must create your class in the default package and your project must be named Project01.java for the autograder to be able to test it when you submit it.

Answers

Answer:

Following are the program to this question:

import java.util.*;//for user-input value  

public class Project01//Decalring a class Project01

{

public static void main(String asq[])//main method  

{

int ax1,ax2;//Decalring integer variables

Scanner oscr=new Scanner(System.in);//creating Scanner class Object

System.out.print("Enter the First number: ");//print message  

ax1=oscr.nextInt();//input first number

System.out.print("Enter the Second number: ");//print message

ax2=oscr.nextInt();//input second number

System.out.println(ax1+ "+"+ax2+"= "+(ax1+ax2));//use print method to perform the arithmetic operation  

System.out.println(ax1+"-"+ax2+"= "+(ax1-ax2));//use print method to perform the arithmetic operation

System.out.println(ax1+"*"+ax2+"= "+(ax1*ax2));//use print method to perform the arithmetic operation

System.out.println(ax1+"/"+ax2+"= "+(ax1/ax2));///use print method to perform the arithmetic operation

System.out.println(ax1+"%"+ax2+"= "+(ax1%ax2));//use print method to perform the arithmetic operation

System.out.println("The average of your two numbers is: "+(ax1+ax2)/2);//calculating average

}

}

Output:

Please find the attached file.

Explanation:

In the program, inside the class "Project01" and the main method two integer variable "ax1,ax2" is declared that uses the scanner class concept for input the value from the user-end, and in the next step, it uses the print method with the arithmetic operation to perform and prints its calculated value.

developed the first compiler and conducted work that led to the development of COBOL ?

Answers

Answer:

Grace Hopper.

Explanation:

Grace Hopper was a US Naval Rear Admiral and an American computer scientist who was born on the 9th of December, 1906 in New York city, United States of America. She worked on the first commercial computer known as universal automatic computer (UNIVAC), after the second World War II.

In 1953 at the Remington Rand, Grace Hopper invented the first high-level programming language for UNIVAC 1 by using words and expressions.

Additionally, the high-level programming language known as FLOW-MATIC that she invented in 1953 paved the way for the development of common business-oriented language (COBOL).

Hence, Grace Hopper developed the first compiler and conducted work that led to the development of COBOL.

Team ordering You have the results of a completed round-robin tournament in which n teams played each other once. Each game ended either with a victory for one of the teams or with a tie. Design an algorithm that lists the teams in a sequence so that every team did not lose the game with the team listed immediately after it.What is the time efficiency class of your algorithm

Answers

Answer:

Following are the analogies to this question:

Explanation:

In each match, the group is a comparison because there may be a tie situation, which already implies, that its triage was unabated, 1 means the best team, and n means the worst team.

It makes it much easier to address whether another 'Quick Sort' or even the 'Merge Sort' issue by converting the very same problem throughout the number problem.

All the cases use for the Merge Sort, in which it utilizes its evenly divide or overcome strategy where the category is reciprocally divided into two parts where the number becomes measured at n==2, and the outcome extends.

Assume we get 7 squads:

2 4 5 4 3 1 6

Recursively split the above teams:

2 4 5 4 3 1 6

2 4 5 4 3 1 6

We'll equate such figures with base-case (n==2) (have a match against each other)

2 4 4 5 1 3 6 (number of matches 1(2,4) + 1(5,4) + 1(3,1) = 3)

Now the division is combined.

1, 2 ,3, 4, 4, 5

NLogN was its best time complexity of an algorithm but N is the lot of clubs.

Write a program that has a user guess a secret number between 1 and 10. Store the secret number in a variable called secret Number and allow the user to continually input numbers until they correctly guess what secretNumber is. For example, if secretNumber was 6, an example run of the program may look like this:

Answers

Answer:

The program in Python is as follows:

import random

secretNum = random.randint(1,10)

userNum = int(input("Take a guess: "))

while(userNum != secretNum):

    print("Incorrect Guess")

    userNum = int(input("Take a guess: "))

print("You guessed right")

Explanation:

This imports the random module

import random

This generates a secrete number

secretNum = random.randint(1,10)

This prompts the user to take a guess

userNum = int(input("Take a guess: "))

This loop is repeated until the user guess right

while(userNum != secretNum):

    print("Incorrect Guess")

    userNum = int(input("Take a guess: "))

This is executed when the user guesses right

print("You guessed right")

What is the output of the following code snippet? int s1 = 20; if (s1 <= 20) { System.out.print("1"); } if (s1 <= 40) { System.out.print("2"); } if (s1 <= 20) { System.out.print("3"); }

Answers

Answer:

The program outputs 123

Explanation:

The first line of the program initializes s1 to 20

The second line checks if s1 is less than or equal to 20.

This is true,

So, 1 is printed

The third line checks if s1 is less than or equal to 40.

This is true,

So, 2 is printed

The fourth line checks if s1 is less than or equal to 20.

This is true,

So, 3 is printed

Hence, the output is 123

Questions Presscomion

Answers

Answer:

i dont get what you are trying to ask

Explanation:

1. What are the 3 main Microsoft Office productivity software programs that is used by millions of people worldwide and will be used to submit your Teacher Graded Assignments in this Computer Literacy course?

Answers

Answer: the top 3 are Microsoft word

                                     Microsoft Excel

                                     Microsoft PowerPoint

Explanation:

Which of the following is an accurate statement about the Internet ?
a. It began as a project of the Department of Defense.
b. Its operations are controlled by the United States government.
c. It was designed primarily for the purpose of e-commerce.
d. Most of the information on the Internet is accessible through the World Wide Web.

Answers

Answer:

It began as a project of the Department of Defense.

Explanation:

The first known and recorded prototype of the internet that was workable arrived during the 1960s when the Advanced Research Projects Agency Network (ARPANET) was created. The project was initially funded by the United States Department of Defense and ARPANET allowed for packet switching, to ensure multiple computers were able to communicate on a single network

You can expect to see

Answers

Answer:

what?ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

Answer:

D

Explanation:

You can expect to see ________.

A. STOP signs or traffic lights on limited access highways

B. only traffic lights on limited access highways

C. only STOP signs on limited access highways

D. no STOP signs or traffic lights on limited access highways

please help

Answers

with what?

----------------------------------------------------

Answer:

Please Add a Picture

Explanation:

We are unable to help you if you do not know how please notify me!

Define a class called UpdatedBook which inherits the BookInfo class created in Programming Project 3. This new class should contain an integer field for the edition number of the book, a constructor to create the UpdatedBook object accepting as input the author, title, and edition number of the book, and a getter method to return the edition number.

Answers

Answer:

Following are the class definition code to this question:

class UpdatedBook : BookInfo//defining a class UpdatedBook that inherits the BookInfo class

{

   public:

   int edition_Number;//defining an integer variable

   UpdatedBook (string title,string author,int edition):BookInfo(b_title,b_author)//defining a constructor that  

   {

       edition_Number=edition;

   }

   int getEdition_Number()

   {

   return edition_Number;

   }

};

Explanation:

In this question, the "BookInfo" class is not defined, that's why we define this code as above.

In this code, a class "UpdatedBook" is defined that inherits its base class "BookInfo" inside the "UpdatedBook" class an integer variable "edition_Number" is declared, which is used to holding the integer value.

In the next step, a parameterized constructor is declared, that accepts a three-parameter and also inherits its base class parameterized constructor, and at the last, a get method is used that returns the edition number value.

Cleaning agents and food products should be stored separately.
TRUE
FALSE

Answers

Answer:

true

Explanation:

Suppose that the following elements are added in the specified order to an empty binary search tree: Kirk, Spock, Scotty, McCoy, Chekov, Uhuru, Sulu, Khaaaan! Write the elements of the tree above in the order they would be seen by a pre-order, in-order, and post-order traversal. Type your solutions with the elements separated by spaces and/or commas, such as:

Answers

Answer:

Pre-order: Kirk, Chekov, Khaaaan, Spock, Scotty, McCoy, Sulu, Uhuru

In-order: Chekov, Khaaaan, Kirk, McCoy, Scotty, Spock, Sulu, Uhuru

Post-order: Khaaaan, Chekov, McCoy, Scotty, Sulu, Uhuru, Spock, Kirk

Explanation:

The binary search tree is described in the diagram below.

The pre-order traversal of the binary tree gets the root, then the left node and right node. The in-order traversal picks the left node, the root node, and then the right node while the post-order traversal of the binary tree follows the left node, right node, and then the root node.

) Write a program to calculate the time to run 5 miles, 10 miles, half marathon, and full marathon if you can run at a constant speed. The distance of a half marathon is 13.1 miles and that of a full marathon is 26.2 miles. Report the time in the format of hours and minutes. Your program will prompt for your running speed (mph) as an integer.

Answers

Answer:

def cal_time(distance, speed):

   time = distance / speed

   hour = str(time)[0]

   minutes = round(float(str(time)[1:]) * 60)

   print(f"The time taken to cover {distance}miles is {hour}hours, {minutes}minutes")

miles = [5, 10, 13.1, 26.2]

myspeed = int(input("Enter user speed: "))

for mile in miles:

   cal_time(mile, myspeed)

Explanation:

The python program prints out the time taken for a runner to cover the list of distances from 5 miles to a full marathon. The program prompts for the speed of the runner and calculates the time with the "cal_time" function.

A state university locks in costs for a student once a student starts attending the university. The total cost is $24,500. A student has the following help in covering the costs of school.

An academic scholarship of $10,700.
Other scholarships and grants of $5,000.
Relatives pay $1,600.
What is the amount that the student will need to save every month in order to pay off the remaining costs in 10 months?


$500

$550

$600

$720

Answers

10,700+5000+1600=17,300
24,500-17,300=7,200
7,200/10=
$720.00 will need to be saved every month.

Answer:

720

Explanation:

Write a program to take in a time-of-day on the command-line as 3 integers representing hours, minutes, and seconds, along with a 4th argument of additional seconds. Recompute the time by adding the additional seconds to the time in the first three command-line arguments. Output: - display the original time given on the command-line - display the newly computed time Example: python computeTime.py 5 59 32 30 Initial time: 5:59:32 Computed time: 6:00:02 {6:0:2 would also be acceptable}

Answers

Answer:

In Python:

hh = int(input("Hour: ")) * 3600

mm = int(input("Minutes: ")) * 60

ss = int(input("Seconds: "))

seconds = int(input("Additional Seconds: "))

time = hh+ mm + ss + seconds

hh =  int(time/3600)

time = time - hh * 3600

mm = int(time/60)

ss = time - mm * 60

while(hh>24):

   hh = hh - 24

print(str(hh)+" : "+str(mm)+" : "+str(ss))

Explanation:

We start by getting the time of the day. This is done using the next three lines

hh = int(input("Hour: ")) * 3600

mm = int(input("Minutes: ")) * 60

ss = int(input("Seconds: "))

Then, we get the additional seconds

seconds = int(input("Additional Seconds: "))

The new time is then calculated (in seconds)

time = hh+ mm + ss + seconds

This line extracts the hours from the calculated time (in seconds)

hh =  int(time/3600)

time = time - hh * 3600

This line extracts the minutes from the calculated time (in seconds)

mm = int(time/60)

This line gets the remaining seconds

ss = time - mm * 60

The following iteration ensures that the hour is less than 24

while(hh>24):

   hh = hh - 24

This prints the calculated time

print(str(hh)+" : "+str(mm)+" : "+str(ss))

Other Questions
Please help quick 10 points if you were a health counselor what you suggest to someone regarding food and nutrition? ( it's for school ) Type the value of the ? below. which expression is equivalent to 3 x 3 x 3 x 3 Find the total surface area of this cubiod witnessed this horrible exhibition. I was quite a child, but I well remember it. Inever shall forget it whilst I remember anything. It was the first of a long seriesof such outrages, of which I was doomed to be a witness and a participant. Itstruck me with awful force. It was the blood-stained gate, the entrance to thehell of slavery, through which I was about to pass. It was a most terriblespectacle. I wish I could commit to paper the feelings with which I beheld it." What chapter is this quote from Which value of y makes the inequality 3y^2+2(y-5)>8 true A y=0 B y= -1C y= -2D y= -3 What are the two solutions of x^2-2x-4=-3x+9 Diboseng has cut a drum in half to use as a water-trough for his cattle. The length of the trough is 140 cm and the diameter is 90 cm Plz answer correctly! Will give brainlest!!!GOODMANJust stay right where you are, Steve. We don't want any trouble but this time if anybody sets foot on my porch that's what they're going to get trouble!STEVELook, Les GOODMANI've already explained to you people. I don't sleep very well at night sometimes. I get up and I take a walk and I look up at the sky. I look at the stars!MRS. GOODMANThat's exactly what he does. Why this whole thing it's . . . it's some kind of madness or something.STEVE(nods grimly)That's exactly what it issome kind of madness.CHARLIE'S VOICE(shrill, from across the street)You best watch who you're seen with, Steve! Until we get this all straightened out, you ain't exactly above suspicion yourself.STEVE(whirling around toward him)Or you, Charlie. Or any of us, it seems. From age eight on up!Based on this passage, what will most likely happen next? Only Les will be accused of being an alien.More neighbors will be accused of being aliens.Les will prove his innocence to his neighbors.Steve will turn out to be an alien invader in disguise. Help Me out pleaseI will mark brainiest 6p=48Help a kid out A flea and dog are an example of (commensalism herbivory mutualism parasitism) , because the flea irritates the dog's skin and feeds on its blood. Certain bacteria live in the digestive tract of humans , and their relationship is an example of (commensalism / herbivory mutualism parasitism) because the bacteria help humans to break down the food they eat. Cattle egrets eat insects off the back of an elephant, which is an example of (commensalism herbivory mutualism/ parasitism) because the cattle egrets benefit without either harming or helping the elephants. Solve the following equations:A) 3x = 15B) y + 7 = 13 please help this is due on Friday at the end of the semester Enter the number that belongs in the green box PLEASE HELP FAST Divide the polynomials.Your answer should be a polynomial.22 - 71 +12I-3 dear writing yesterday it was your first day in your new school you made new friends teachers were good to you and you liked the infrastructure of the school write about your experiences and feelings about the new school in your diary Which represents a function? Hi can someone help me plz??????