Page 1 of 1

ATM MACHINE In this assignment you will create a program, in C++, that allows a user to do the following: MAIN MENU: 1)

Posted: Fri Apr 29, 2022 7:04 am
by answerhappygod
ATM MACHINE
In this assignment you will create a program, in C++, that
allows a user to do the following:
MAIN MENU:
1) Create a bank account by supplying a User ID (NOT
password).
2) Login using their ID - ONLY.
3) Quit the program.
Now if login was successful the user will be able to do the
following:
OPERATIONS MENU:
1) Withdraw money.
2) Deposit money.
3) Request balance.
4) Go back to Main Menu.
If login was not successful (for example, the User ID did not
match) then the user will be taken back to the main menu.
Rules:
1. A user ID can only comprise of positive integers, from 1 – 10
ONLY. So only 10 accounts should be
created and maintained. The record of accounts must be
maintained in an array.
2. When you are creating a User ID, it should not comprise of
non-integer pattern such as characters,
special/alpha-numeric characters and/or string values. If a user
enters a non-numeric User ID, during
account creation, system should display an error message and ask
User ID again.
3. Login should only prompt for user ID. Not password.
4. If a User ID exists, the user should be able to login and see
the OPERATIONS MENU. Otherwise, keep going back to MAIN MENU.
5. Initial BALANCE for each account should be 0.
6. For the choice below, post successful login
Withdraw money:
• The ATM system should only take numeric value. System should
prompt an error if a character, string
or an alpha-numeric character is entered. System should as again
for the Deposit Amount until a
correct value is entered.
• Note that the ATM system can only dispense currency notes that
are available e.g. 5000, 1000, 500,
100, 50, 20 and 10). So system should not accept withdrawal
amounts such as 5542, 308 etc. System
should ask again for the Deposit Amount until a correct value is
entered.
• For the amount of withdrawal needed, since this is not a real
ATM, you should display on the screen
• Currency note denomination(s) & Number of note for each
denomination dispatched e.g. if
550.00 is entered by the user for withdrawal, the message on the
screen be like
“Cash Withdrawal for Rs. 545 requested
a. Denomination 100s – 5
b. Denominations 20s – 2
c. Denominations 10s – 1
• System should not accept any values for change e.g., 350.42.
As the ATM cannot dispense
change/coins. So the user should only be able to enter values
like 300.00, 560.00 etc. System should
ask again for the Deposit Amount until a correct value is
entered.
• System should not dispense money more than the current account
balance.
7. For the choice below, post successful login
Deposit money:
• The ATM system should only accept numeric values (both integer
and decimal). System should display an error if a character, string
or an alpha-numeric character is entered. System should ask again
for the Deposit Amount until a correct value is entered.
• A user should be able to deposit change e.g. 5988.81 is a
valid deposit amount.
8. DO NOT use any C++ built-in functions.
This is what your program in action will look like:
Hi! Welcome to Mr. (Your name)’s ATM Machine!
Please select an option from the menu below:
l -> Login
c -> Create New Account
q -> Quit
> l (Selected option)
Please enter your user id: 6
******** Account Does not Exist !!! ********
Please select an option from the menu below:
l -> Login
c -> Create New Account
q -> Quit
> c (Selected option)
Please enter your user name: 1
Thank You! Your account has been created!
Please select an option from the menu below:
l -> Login
c -> Create New Account
q -> Quit
> l (Selected option)
Please enter your user id: 1
Access Granted!
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
m -> Go back to Main Screen.
> d (option selected)
Enter Amount of deposit:
>Rs. 1000
Amount credited successfully
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
m -> Go back to Main Screen.
> r
Your balance is RS.1000.
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
m -> Go back to Main Screen.
> w
Amount of withdrawal:
> 500
Cash Withdrawal for Rs. 500 requested
Denomination 100s – 5
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
m -> Go back to Main Screen.
> r
Your balance is Rs. 500.54
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
m -> Go back to Main Screen.
> m
l -> Login
c -> Create New Account
q -> Quit
>q
Display – “Thanks for stopping by User 1! BYE”
When the user press ENTER, the system goes back to Main Menu and
the user can start all over again.