You are here:

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.

David Spector


All Answers

Answers by Expert:

Ask Experts


David Spector


Highly knowledgeable in the C++ language, Visual C++ (MSVC), Windows API, documentation and other quality-assurance techniques, and debugging. Knowledgeable in MFC, COM, GUI design, and object-oriented design.


I have been a software engineer since 1965. I have been published. My specializations have been: biomedical programming, compiler implementation, and many kinds of Windows programming. I don't do Databases or other business-oriented stuff.

Windows?/DOS Developer's Journal, ACM SIGPLAN Notices, and Computer Science Press.

ICCP Systems Programming Certification
Master's degree equivalent in Computer Science

©2017 All rights reserved.

[an error occurred while processing this directive]