IN JAVA PLEASE 2. Write a client-server program to work like an ATM machine usin
ID: 3749879 • Letter: I
Question
IN JAVA PLEASE
2. Write a client-server program to work like an ATM machine using UDP protocol. The client program should have the ability to choose operations, such as deposit, withdraw and balance check of the user if he is a valid user. And server program maintains a file with user details for authentication. For each row we would have user details including name, pin, and available balance. When a client requests to deposit or withdraw money, then the server should prompt them for their id and pin and after their validation, the server should allow them to deposit or withdraw money (On deposit add the money to the available balance and on withdraw deduct the available balance by the amount given and save this information to the file, and also provide some sentence to client program that the operation is successfully done). Test the operations from client program like deposit+balance check, withdraw+balance check, invalid user trying to withdraw/deposit/checking balance (show an error message that he is not a user) and provide screenshots of their output. NOTE: Maintain a txt file with predefined user details with a space/tab separating their details or you can add one more operation that will create a new account with the detas a above alsoExplanation / Answer
ANSWER:
Server Code
Atm Client Code
Sample File(details.txt)
23 test1 1234 7878
25 test2 1235 7690
===================================================
NOTE:Run the server code first, and then the client code for running and seeing the output