Question: Task 3. Server-side program (35 marks) Implement the server-side requirements and then provide code snippets for each function with clear explanations/comments of key statements used.
Task 3. Server-side program (35 marks) Implement the server-side requirements and then provide code snippets for each function with clear explanations/comments of key statements used. i. Create a thread using extending thread class or implementing a runnable interface and implement a run method. ii. After receiving the Customer Type and consumption from the client side, the server should make a connection to the database. iii. Search the database using the Customer Type and retrieve the appropriate tariff rate. iv. Use the retrieved tariff rate to calculate the bill. v. Return to the client the bill, and the tariff rate used. vi. Close the connection with the database when done. vii. Create a main class called custServer, define the main method, creation of client object, and start the thread
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
