Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Without using arrays or loops or anything like that MUST use switch statement Question 2 (7pts): Dynamic Latency-Computer Program Consequently, as a Summer (Student) Intern

Without using arrays or loops or anything like that

MUST use switch statement

image text in transcribedimage text in transcribedimage text in transcribed

Question 2 (7pts): Dynamic Latency-Computer Program Consequently, as a Summer (Student) Intern in the Project-S Space-Exploration program, part of your job description involves you evaluating point-to-point connections between computing nodes on a daily basis. To this end, on daily basis, you shall be computing the latency incurred in transferring a given quantity of data between any two (2) given nodes within the Project-S MAN. With regard to a microwave communication link on the Project-S network, the tabular data below defines the dailv standard bandwidth and the dailv (10 Gigabvtes of data) latencv. Therefore, design an algorithm; and thereafter, develop a Java program based on your predesigned algorithm such that your algorithm and source code will accomplish the following: 1. Title/Name of your algorithm = Algorithm 2: Dynamic Latency Computer 2. Name of the Java program/class = A2 Q2 3. Display a prompt message for the user to enter the Weekday, the Mode, and a given data quantity as a single group of input separated via space characters. The data quantity value MUST be in {n}y}B format where n is a number and y is a prefix quantifier. Also, the data quantity MUST be either of the following: 10GB,20PB, or 30ZB. Hence, valid inputs for the Weekday (Monday - Sunday), the Mode (Bandwidth or Latency), and the data quantity (10GB, 20PB, or 30ZB ) variables MUST be case-insensitive. 4. Validate the user's inputs to ensure that only valid values were entered for the Weekday, the Mode, and the data quantity inputs. If an invalid input was received; display the respective error message, and end the program with a note for the user to try again. 5. If the user has entered a valid input with respect to the Weekday, the Mode, and the data quantity; process the user's inputs to determine the corresponding real value in either Bandwidth mode or Latency mode. 6. Thereafter, compute the resultant value for the latency, in milliseconds (ms), incurred with respect to the transmission of the given data quantity over Project-S microwave communication link. 7. You MUST use the switch () statement to implement all your decision/selection logic with respect to the real values for the Bandwidth, the Latency, and the data quantity variables herein. In this regard, using an if () statement in lieu of switch () statement will be assumed as a logical failure; and this will attract zero (0) point. 8. After processing, display a confirmation message to the user in the form below: Latency incurred in transmitting {n}{y}B of data, over Project-s microwave network link, is: \{value\}ms 9. Finally, display a complimentary-close message as follows: Once again, thanks for your contribution to Project-s. The following are sample screen shots to illustrate the expected behavior of your program. Your program must display the same information, using the same format, as depicted below: Welcome to the Dynamic Latency-Computer Program: Please enter a Weekday, Mode, and Data Quantity, respectively: SATURDAY bandwidth 2ePB Latency incurred in transmitting 20PB of data, over Project-s microwave network link, is: 142.45455ms Once again, thanks for your contribution to Project-s. Figure 10. Sample-1 output of Question 2 Welcome to the Dynamic Latency-Computer Program: Please enter a Weekday, Mode, and Data Quantity, respectively: monday latency 30zb Latency incurred in transmitting 30ZB of data, over Project-s microwave network link, is: 26388279.066624ms Once again, thanks for your contribution to Project-s. Figure 11. Sample-2 output of Question 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions