The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 399 Weeks Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Create the ATM simulation according to the following requirements. (1) Welcome the user. (2) provide three options: (a) to withdraw money, (b) to deposit money, or (c) to check their balance. (3) For deposits and withdraws, prompt the user for an amount. (4) Display an appropriate error message if the user tries to withdraw more money than is available. (5) The account balance should update in response to the deposit/withdraw. (6) After the transaction is complete, have the program ask the user if they are finished. If yes then display the current balance, if not then the program should repeat the steps above (do not repeat the welcome).
Assume the user starts with $10,000 in the bank. The following is an example of what your command window should look like after the program has run.
Welcome to the ATM
What would you like to do (withdraw = 1, deposit = 2, check balance = 3): 2
Enter an amount to deposit: 500
Your current balance is: 10500.00
Are you finished (yes=1, no=0)? 0
What would you like to do (withdraw = 1 deposit = 2 check balance =3): 3
Your current balance is: 10500.00
Are you finished (yes=1, no=0)? 1
What would you like to do (withdraw = 1 deposit = 2 check balance =3): 1
Enter an amount to withdraw: 492814
Error. You donA????1t have that much money in your account.
Your current balance is: 10500.00
Are you finished (yes=1, no=0)? 1
Thank you and have a nice day.
Test your program with the following transactions
Deposit $250
Withdraw $11,000
Withdraw $1,800
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- Th-----------ank----------- Yo-----------u f-----------or -----------usi-----------ng -----------our----------- we-----------bsi-----------te -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------