Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please code In Java please thank you! Introduction With reference to the domain of Computer Science, employ the following definitions toward completing the assigned tasks
Please code In Java please thank you!
Introduction With reference to the domain of Computer Science, employ the following definitions toward completing the assigned tasks herein. Bandwidth: A measure of the quantity of data that can travel through a given communication channel/link in one second. This is measured in bits per second (bps). Latency: A measure of the delay incurred with respect to the transfer of data, from source to destination, via a given communication channel/link. It is measured in milliseconds (ms). Byte: The equivalence of one byte (1B) is eight bits (8 b). Prefixes of Quantifiers: 1Kilo(1K)=210;1 Mega (1 M) =220; 1 Giga (1G)=230;1 Tera (1T)=240;1 Peta (1 P) =250; 1 Exa (1E)=260;1 Zetta (1Z)=270;1 Yotta (1Y)=280. 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 Gieabvtes 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: Please enter a Weekday, Mode, and Data quantity, respectively: saTuibay banduldth 2ep0. Latency incurred in transmitting 2ePb of data, over Project-5 mitrowave network 1ink, is: 142.e45455ms once again, thanks for your contribution to Project-5. Figure 10. Sample-1 output of Question 2 please enter a Weekday, Mode, and Data Quantity, respectively: monisey latency 3ezb Latency incurres in transeitting sezb of data, ever Project-5 microwave network 11nk, Is: 2638s279. 066624ms Once again, thanks for your contribution to Project-s. Figure 11. Sample-2 output of Question 2 Please enter a Weekday, Mode, and Dato quantity, respectivelyz sunbar Eanciatath 20pt Latency incurred in transmitting 2ePb of data, over Project-S micrewave network link, iss e.1es725ms Once again, thanks for your contribution to Project.5. Figure 12. Sample-3 output of Question 2 Welcome to the Dynamic Latency-Computer Program: Please enter a Weekday, Mode, and Data quantity, respectively: MeDntsDy LatEncy 10g gi 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 2ePB 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 Dynam Latency-Computer Program: P1ease enter a Weekday, Mode, and Data Quantity, respectively: Bandididth MonDAy 3ezb Error: Invalid value entered for the 'Mode' variable. Kindly retry with a valid input. Once again, thanks for your contribution to Project-s. Figure 15. Sample-6 output of Question 2 Welcome to the Dynamic Latency-Computer Programt Please enter a Weekday, Mode, and Data Quantity, respectively: MonDay Bandikldth 3eatb 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 pease enter a Weekday, Mode, and Data quantity, respectively: fHiDay fla Iath zapt. Latency incurred in transmitting 20PB of date, over Project-5 microwave network link, is: 277777,777778ms once again, thanks for your centribution to Project-5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started