README.md
md1 kBIn final_24_25_2.zip
Exercise 2
Write a Java program using TCP sockets to implement a "Multi-Client Online Banking Simulation Server".
Server Side
- TCP Multi-threaded Server: Listens for incoming client connections on a TCP port and spawns a separate thread for each client.
- Account Management: Each client logs in with a unique username and a predefined PIN stored in the server's memory. Each account has a balance initialized by the server.
- Supported Commands:
BALANCE: Returns the current balance.DEPOSIT <amount>: Adds the specified amount to the balance.WITHDRAW <amount>: Withdraws the specified amount if sufficient funds exist.EXIT: Logs the client out and closes the connection.
Client Side
- Connects to the server and logs in using a username and PIN.
- Displays a menu of operations (
BALANCE,DEPOSIT,WITHDRAW,EXIT). - Sends commands to the server and displays the server's responses.