C++/tcp/ip socket programing
An Automatic Teller Machine is essentially a client-server system. The bank's central computer is the server, and maintains information about the accounts of all the customers. The ATM is the client.
You may assume the bank has only one customer - your server needs to keep track of only one balance.
You should assume all amounts are in whole dollars (don't bother with decimal points) and that an account balance can be positive or negative.
The server must:
handle three commands:
deposit: add an amount to the account (and return the new balance)
withdrawal: subtract an amount from the account (and return the new balance)
query: return the account balance to the client
be a simple iterative server, that is it handles only one connected client at a time.
The client must:
connect to the server when it is started
allow the user to perform any of these functions, and see the balance each time
allow the user to exit the program (and consequently disconnect from the server)
R.Giriraj , Thank you for your question.
Is this homework?
It is against my policy to do homework questions. I can help you with work that you have already done, but I cannot give you full answers.
Please attempt to do part of the work, and then ask a specific question when you get stuck.
Learning can be difficult, but doing your own work will repay your effort with good grades in school and success in your career.