Question

Write a program that simulates as Automatic Teller Machine (ATM). Since you probably don't have access to a card reader, have the initial screen ask for user id and a PIN. The user id will be used to look up the info for the user's accounts (including the PIN to see if it matches what the user types). Each user will have access to a checking account and a savings account. The user should able to check balances, withdraw cash, and transfer money between accounts. Design your interface to be similar to what you see on your local ATM. The user account information should be stored in a file when the program terminates. This file is read in again when the program restarts.

Solution

Verified

Step 1

1 of 7

For this program, I made two classes: ATM\texttt{ATM}, which handles all of the data processing, and Customer\texttt{Customer}, which holds the information for a single customer. To run this program you'll need to already have a text document containing customer accounts made as I don't provide a way to add a new customer (ATMS usually can't create new accounts with the bank). The formatting for the file is specified by lines containing the following information:

user id\texttt{user id} <<tab>> user pin\texttt{user pin} <<tab>> checking balance\texttt{checking balance} <<tab>> savings balance\texttt{savings balance}.

The ATM uses a menu-based interface that I tried to mimic the actual interfaces I've seen at ATMs.

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Recommended textbook solutions

Computer Organization and Design MIPS Edition: The Hardware/Software Interface 5th Edition by David A. Patterson, John L. Hennessy

Computer Organization and Design MIPS Edition: The Hardware/Software Interface

5th EditionDavid A. Patterson, John L. Hennessy
220 solutions
Fundamentals of Database Systems 7th Edition by Ramez Elmasri, Shamkant B. Navathe

Fundamentals of Database Systems

7th EditionRamez Elmasri, Shamkant B. Navathe
687 solutions
Introduction to Algorithms 3rd Edition by Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen

Introduction to Algorithms

3rd EditionCharles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen
720 solutions

Related questions