Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the scenario given below, write and execute a Client - Server application using Java Socket programming and File handling as per the description below.The
Using the scenario given below, write and execute a ClientServer application using Java Socket programming and File handling as per the description below.The XYZ Fitness Tracker app enables trainers to track their session earnings. Trainers input the trainer id session fee and the number of sessions conducted. You can take any values for the fees and number of sessions.This data is sent to the server for total earning, commission calculation and the feedback.The server calculates the total earnings by multiplying the session fees and the number of sessions.The commission is calculated based on the scheme given below:If a trainer earns more than or equal to OMR in a month, they receive a commission on the total earnings; If a trainer earns between OMR to OMR in a month, they receive a commission on the total earnings, if they earn less than or equal to OMR, they receive a commission on the total earnings.Based on the commission the feedback is also given to the trainer. Commission : feedback"excellent" Commission between and : feedback"need to upgrade the number of clients" Commission : feedback"you may be fired soon"The server then sends back to client: the trainer id total earnings, commission, and feedback to the client side for display to the trainer.Task : The server side.a Ensure that the necessary packages are importedb, Implement the program structure including the class, the main method, and the exceptionC. Create necessary objects to allow for setting up connection point, reading data from the network, and sending data over the networkd. Read appropriate data from the client and send result to the cliente. Implement and ensure connection request can be acceptedf. Do the necessary calculationsg. Appropriate use of variablesh. Shut down the communication once done
Step 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