Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use basic Java Language Question 2 (7pts): Dynamic Latency-Computer Program Consequently, as a Summer (Student) Intern in the Project-S Space-Exploration program, part of your

Please use basic Java Language
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image 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 daily standard bandwidth and the dailv (10 Gieabutes of datal latencu 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 _ 22 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 {nHy}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 our 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: 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 Progpam: t+t+t+t+t+t+t+t+t+t+t+t+t+t+4+t+t+t+t+t+t+t+t+ Please enter a Weekday, Mode, and Data Quantity, respectively: SATuADAY bandinidth 2epB Latency incurred in transmitting 20PB of data, over Project-s microwave network 14 ink, is: 142.045455ms Once again, thanks for your contribution to Project- 5 . Figure 10. Sample-1 output of Question 2 Welcome to the Dynamic Latency-Computer Programt Please enter a Weekday, Mode, and Data Quantity, raspectivelyi mondiy 2 a cancy jozb Latency incurred in transinitting 1026 of data, over Project-s aicrowave network 1 ink, is: 263a8279. 06e6zams Once again, thanks for your contribution to Project-s. Figure 11. Sample-2 output of Question 2 Welcome to the Dynamic Latency-Computer Program: Please enter a Weekday, Mode, and Data Quantity, respectively; zkngaY BAnderdath 2epse Latency incurred in transmitting 20PB of data, over Project- 5 microwave network 1 ink, isi 0.101725m5 Once again, thanks for your contribbution to Project-s. Figure 12. Sample-3 output of Question 2 Welcome to the Dynamic Latency-Computer Program: Please enter a Weekday, Mode, and Data Quantity, respectively: KeDnEsDy 1AtEnCy 1 1egs Error: Invalid value entered for the 'Weekday' variable. Kindly retry with a valid input. Once again, thanks for your contribution to Project-s. Figure 13. Sample-4 output of Question 2 Welcome to the Dynamic Latency-Computer Program: Please enter a Weekday, Mode, and Data Quantity, respectively: THURSDAY BANDWDTH 20PS Error: Invalid value entered for the 'Mode: variable. Kindly retry with a valid input. Once again, thanks for your contribution to Project-s. Figure 14. Sample-5 output of Question 2 Welcome to the Dynamic Latency-Computer Program: Please enter a Weekday, Mode, and Data Quantity, respectively: BandWidth HonDay: 3 ,ith Error: Invalid value entered for the. 'Mode' variable. Kindly retry with a valld input. Once again, thanks for your contribution to Project-s. Welcome to the Dynamic Latency-Computer Program: Please enter a Weekday, Mode, and Data Quantity, respectively: THURSDAY BANDWDTH 2OPB Error: Invalid value entered for the 'Mode' variable. Kindly retry with a valid input. Once again, thanks for your contribution to Project-s. Figure 14. Sample-5 output of Question 2 Welcome to the Dynamic Latency-Computer Program: Please enter a Weekday, Mode, and Data Quantity, respectively: BandWidth MonDAY 30zb Error: Invalid value entered for the 'Mode' variable. Kindly retry with a valid input. Once again, thanks for your contribution to Project-5. Figure 15. Sample-6 output of Question 2 Welcome to the Dynamic Latency-Computer Program: please t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+1+t+t+t+t+t+t+t+t Please enter a Weekday, Mode, and Data Quantity, respectively: Monoay Bandaidth 300b Error: Invalid value entered for the 'Data Quantity' variable. Kindly retry with a valid input. Once again, thanks for your contribution to Project-s. Figure 16. Sample-7 output of Question 2 Please enter a Weekday, Mode, and Data Quantity, respectively: faipay Batcwidem 20es? latency incurred in transmitting 2apB of data, over Project-5 microwave network 1ink, is: 177777,777778ns once again, thanks fon your contribution to Project-s. Figure 17. Sample-8 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

Students also viewed these Databases questions

Question

Describe the new structures for the HRM function. page 676

Answered: 1 week ago