Question: Please solve this with java :) In this assignment, you are required to write two classes: one that represents a UDP server and the other

Please solve this with java :)

Please solve this with java :) In this assignment, you are required

In this assignment, you are required to write two classes: one that represents a UDP server and the other represents a UDP client. The operation of the program can be concluded in the client sending double values to the server, and the server returning either the average or the maximum value of the sent numbers based on the client request as follows: 1. The client program must read the operation to be performed, either computing the average or finding the maximum value, from the user. Then, the program must read double values from the user, until the user enters -1 (positive double values are only assumed to be entered). Make sure you prompt the user to enter what is required with appropriate messages. The client program must then send the operation to be performed then the double values to the server and wait for the server response. When the response is received, it must print the returned value in an appropriate message to the console (e.g. Average of your numbers is .... Or Maximum value is .....) 2. The server must bind to port number 7500 and keep on waiting for requests (packets) to be received from clients. The client packet must include what operation to be performed along with the double values. The server program must compute the value based on the required operation and send it back to the client. In addition, the server must print details of the received packet and numbers to the console as follows: date-time client-ip:client-port\#double_numbers(space separated) - Average_or_Max =.. You can use the loopback address for testing vour application

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!