Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please code in Java with instructions! Thank you! Introduction With reference to the domain of Computer Science, employ the following definitions toward completing the assigned

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Please code in Java with instructions! 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 (8b). Prefixes of Quantifiers: 1Kilo(1K)=210;1Mega(1M)=220; 1 Giga (1G)=230;1 Tera (1T)=240;1Peta(1P)=250; 1 Exa (1E)=260;1 Zetta (1Z)=270;1Yotta(1Y)=280. Question 1 (7pts): Static Latency-Computer Program Summer internships are fast approaching, and companies/firms have already begun recruiting capable candidates to fill up some Summer (Student) Intern positions. Project-S is a SpaceExploration program handled and managed by a globally reputable company in the Science and Technology sector of our global economy. Thus, Project-S is comprised of a mix of Astronomers, Scientists, Engineers, Research Assistants, and Summer Interns. Additionally, it is important to note that Project-S is essentially a program being designed and developed over a Metropolitan Area Network (MAN) comprising remote servers and computing nodes interconnected via the following media, viz; fibre optics, microwave, coaxial and twisted-pair cables. To this end, you have been recruited to be part of Project-S in the capacity of a Summer Intern, and you shall be reporting directly to your superiors comprising the Unit Head, Departmental Head, and Chief Networking Officer (CNO). Primarily, your job description involves monitoring point-to-point connections between computing nodes, so as to ensure that every communicationetwork link is alive with reference to its defined bandwidth on a given communication medium. Therefore, design an algorithm; and thereafter, develop a program (using Java) based on your predesigned algorithm such that your algorithm and source code will accomplish the following: 1. Title/Name of your algorithm = Algorithm 1: Static Latency Computer 2. Name of your Java program/class =A2Q1. 3. Display a welcome/salutation message to the user of the program. 4. Display a prompt message for the user to enter the bandwidth of a given communication channel/link, in {n}{x}b ps format where n is a number and x is a prefix quantifier, as a single group of user input. 5. Validate the user's input in (4.) above in a bid to ensure that ONLY valid bandwidth data is entered based on the aforementioned format. In the event where the user enters an invalid input for the bandwidth data, display the appropriate error message and terminate the program with a message to the user to retry later. 6. Display prompt messages, one after the other, for the user to enter the source IP address and the destination IP address, respectively, with regard to any two (2) given nodes interconnected within the Project-S MAN. 7. Validate the user's input in (6.) above to ensure that ONLY a valid IP address, based on the Internet Protocol version 4 (IPv4) addressing standard/scheme, is entered by the user. In this regard, a valid IPv4 address possesses the following syntax based on decimal (base10) number system: {0 to 255}.{0 to 255}.{0 to 255}.{0 to 255}. Hence, if the user enters an invalid IPv4 address for either source address or destination address in (6.) above; display the respective error message and terminate the program with a message to the user to retry later. 8. Upon successful validation in (7.) above, prompt the user to enter the amount of data, in {n}y}B format where n is a number and y is a prefix quantifier, as a single group of user input. Thus, this data is assumed to be transmitted from the source IP address to the destination IP address using the communication channel defined in (4.) above. 9. Validate the user's input in (8.) above, so as to ensure that ONLY a valid data amount is entered based on the aforementioned format. If the user enters an invalid quantity of data, display an appropriate error message and terminate the program with a note to the user to try again. 10. Preprocess all the user's inputs above, and compute the latency in milliseconds (ms) that is incurred from transmitting the predefined quantity of data from the source IP address to the destination IP address over the defined network (communication) channel. 11. Finally, display a complimentary-close message as follows: Thank you for your contribution to Project-s. The following are sample screenshots to illustrate the expected behavior of your program. Your program must display the same information, using the same format, depicted in the screenshots: Welcome to the Static Latency-Computer Program: Please enter the bandwidth, in (n)(x)bps format, for the network link: 1erbp: Please enter the source IP address: 10 10e 222254 Please enter the destination. IP address: 2542001005 Please enter data amount, in (n){y}B format, for transmission over the network 1ink: 1008 Latency (10.10e.222.254254.200.100.5)=7.8125ms Thank you for your contribution to Project-S. Figure 1. Sample-1 output of Question 1 Welcome to the Static Latency-Computer Program: t+t++t+t++t+t+t+t+t+t+t+t+t+t++t+t+t+t+t+t+t+t+. Please enter the bandwidth, in {n}{x}bs format, for the network 1ink: 2eecbps Please enter the source IP address: 15 fe 111 Please enter the destination IP address: 225519 Please enter data amount, in {(n){y}B format, for transmission over the network link: 10E8 Latency (1.5.10.1112.255.1.9)=8.589934592E11ms Thank you for your contribution to Project-s. Figure 2. Sample-2 output of Question 1 Welcome to the Static Latency-Computer Program: Please enter the bandwidth, in {n}{x}bps format, for the network 1 ink: 5ekps Invalid input for bandwidth; please re-run and enter the bandwidth in {n}{x}bps format. Thank you for your contribution to Project-5. Figure 3. Sample-3 output of Question 1 Welcome to the Static Latency-Computer Program: Please enter the bandwidth, in {n}{x}bps format, for the network dink: 10egbp: Invalid input for bandwidth; please re-run and enter the bandwidth in {n{xbps format. Thank you for your contribution to Project-s. Figure 4. Sample-4 output of Question 1 Welcome to the Static Latency-Computer Program: Please enter the bandwidth, in {n}{x}b b format, for the network 1 ink: 1evops Please enter the source IP address: 256 10114200 Error: Your entry for source IP address is incorrect. Kindly retry with valid inputs. Thank you for your contribution to Project-s. Figure 5. Sample-5 output of Question 1 Please enter the bandwidth, in {n}{(x)bps format, for the network 1inkt 1eybp: Please enter the source IP address: 255114121 3e Please enter the destination IP address: 1215525610 Error: Your entry for destination IP address is incorrect. Kindly retry with valid inputs. Thank you for your contribution to Project-s. Figure 6. Sample-6 output of Question 1 Welcome to the Static Latency-Computer Program: Please enter the bandwidth, in {n}{x}b s format, for the network IInk: 1.yops Please enter the source IP address: 0 1e 155142 Error: Your entry for source IP address is incorrect. Kindly retry with valid inputs. Thank you for your contribution to Project-s. Figure 7. Sample-7 output of Question 1 welcome to the static Latency-Computer Program: Please enter the bandwidth, in {n}{(x)b bs format, for the network 1 ink: 1stbps Please enter the source IP addresst 152178255 1. 100 Please enter the destination 1P address: 2025542131 Please enter data anount, in {n}(y)B format, for transmission over the network 1 ink: 100gb tnvalid input for the amount of data; please retry with the data amount in (n){y)B format. Thank you for your contribution to Project-s. Figure 8. Sample-8 output of Question 1 Welcome to the Static Latency-Computer Program: Please enter the bandwidth, in {n}(x)bps format, for the network 1ink: 10000kbps Please enter the source IP address: 100151242111 Please enter the destination IP address: 11125314626 Please enter data amount, in {n}{y}B format, for transmission over the network 1ink: 1eecb Invalid input for the amount of data; please retry with the data amount in {n}{yB format. Thank you for your contribution to Project-S. Figure 9. Sample-9 output of Question 1

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

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

When to use visuals and data displays.

Answered: 1 week ago

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago