Question: please do it in java codes and i want the output screenshot for client sida and server side . b) Implement database connectivity and Multithreading:
b) Implement database connectivity and Multithreading: Modify the program in Task 2 so to make use of the database created. i. Create a thread using extending thread class or implementing runnable interface and implement a run method with explanations of the method used. ii. After receiving the room type and number of days from the client side, the server should the following: a. Using the number of days, determine which discount rate should be used (ratelo rate2 or rate3) b. Using the room type, connect to the database and retrieve the appropriate room rate iii. Use the retrieved room rate and the determined discount rate to calculate the invoice iv. Then send the calculated expected invoice (before discount), the room rate used, any discount given, and the final invoice (after discount) back to the client Close the connection with the database once done (20 Marks) V
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
