Answered step by step
Verified Expert Solution
Question
1 Approved Answer
General Description: Write a C++ program that simulates the function of an ATM machine. For each transaction, the program: - asks the user to enter
General Description: Write a C++ program that simulates the function of an ATM machine. For each transaction, the program: - asks the user to enter their current account number and balance (unrealistic, but we don't know how to read data from files yet). displays a menu of transaction options asks the user to choose an option, forcing them to enter a correct option depending on the option chosen, asks for more information performs the calculations for the transaction prints the calculated amounts as a "receipt". The program repeats the above steps continuously until the user enters shutdown for the account number. This is a signal for the ATM to shut down (end program). Specifications (example user input in blue): Beginning of transaction: + - - - - - - - - - - - - - - - - - - - - - + Be creative with the "Logo" use your name and section somewhere in the Logo | Joiner's Bank, Inc. | I CS215-003 +------ --------+ Enter account number: BA-3456-78 Enter account balance: 275.50 these two entries should line up" on the left as shown. OR. if they enter shutdown +--------------------+ | Joiner's Bank, Inc. | can cs215-003 Camscanner----+ Enter account number: shutdown Shutting down...bye! -- -- -- -- -- -- - Enter account number: shutdown Shutting down...bye! Press any key to continue.... use the standard System Pause at end of program Menu: after printing the options, it should repeatedly ask for an option until the user enters B, D or W. B - Balance Inquiry D - Deposit W - Withdrawal Choose an option: Xxx assume they might enter more than one char "Xxx" is an invalid option. Enter B, D or W. print double quotes around any invalid entry Choose an option: b It does not need to accept both upper and lower case "b" is an invalid option. Enter B, D or W. Choose an option: B Finally! They gave a correct answer Scanned with CamScanner Balance Inquiry: when this option is chosen, just print a simple "receipt": +-- | Joiner's Bank, Inc. 1 + --------------------+ Account: BA-3456-78 should line up with the dollar sign below Balance: $ 275.50 Assume the max balance is 99999.99 5 digits before, 2 after the point. Deposit: when this option is chosen, ask for the deposit amount (assume they will enter a float) and print a receipt: Enter deposit amount: 100.00 + ------------------+ + - - - - - - - | Joiner's Bank, Inc. | -----------+ - Account: BA-3456-78 Prev Bal: $ 275.50 Deposit: $ 100.00 New Bal: $ 375.50 Al should line up as shown. All amounts assumed to be 99999.99 or less. Withdrawal: when this option is chosen, ask for the withdrawal amount (assume they will enter a float). Repeat the question as long as the amount entered is greater than the current balance. Then print a receipt: Enter withdrawal amount: 500.00 Insufficient Funds. Current Balance is $ 275.50 Enter withdrawal amount : 100.00 + --------------------- | Joiner's Bank, Inc. 1 --- -- -+ Accoanne BA-4456-78 All should line up as shown. Pres Bal:c$ 1275650 All amounts assumed to be 99999.99 or less. Withdrawn: $ 100.00 + - - - - - - - - - - Nou B1 175 so Withdrawal: when this option is chosen, ask for the withdrawal amount (assume they will enter a float). Repeat the question as long as the amount entered is greater than the current balance. Then print a receipt: Enter withdrawal amount: 500.00 Insufficient Funds. Current Balance is $ 275.50 Enter withdrawal amount: 100.00 +---------------------+ | Joiner's Bank, Inc. | -- - - - + Account: BA-3456-78 Prev Bal: $ 275.50 Withdrawn: $ 100.00 New Bal: $ 175.50 All should line up as shown. Al amounts assumed to be 99999.99 or less. Repeat: after the transaction is complete and the receipt printed, the program should start over at the beginning (printing the logo) for the next customer. Suggestion: Since we won't be covering loops until next week, you can go ahead and start by coding the project assuming: - it won't repeat for multiple customers; do one customer and end program - it won't repeat for an invalid menu option; assume B was entered and continue (You can still print the error message) - It won't repeat for insufficient funds; just let them have a negative balance. (You can still print Scanthe error message) Later, after you learn about loops, you can go back and add the loops to this "mostly done" project. I want to be this code in visual the 2019 studio CS Scanned with CamScanner General Description: Write a C++ program that simulates the function of an ATM machine. For each transaction, the program: - asks the user to enter their current account number and balance (unrealistic, but we don't know how to read data from files yet). displays a menu of transaction options asks the user to choose an option, forcing them to enter a correct option depending on the option chosen, asks for more information performs the calculations for the transaction prints the calculated amounts as a "receipt". The program repeats the above steps continuously until the user enters shutdown for the account number. This is a signal for the ATM to shut down (end program). Specifications (example user input in blue): Beginning of transaction: + - - - - - - - - - - - - - - - - - - - - - + Be creative with the "Logo" use your name and section somewhere in the Logo | Joiner's Bank, Inc. | I CS215-003 +------ --------+ Enter account number: BA-3456-78 Enter account balance: 275.50 these two entries should line up" on the left as shown. OR. if they enter shutdown +--------------------+ | Joiner's Bank, Inc. | can cs215-003 Camscanner----+ Enter account number: shutdown Shutting down...bye! -- -- -- -- -- -- - Enter account number: shutdown Shutting down...bye! Press any key to continue.... use the standard System Pause at end of program Menu: after printing the options, it should repeatedly ask for an option until the user enters B, D or W. B - Balance Inquiry D - Deposit W - Withdrawal Choose an option: Xxx assume they might enter more than one char "Xxx" is an invalid option. Enter B, D or W. print double quotes around any invalid entry Choose an option: b It does not need to accept both upper and lower case "b" is an invalid option. Enter B, D or W. Choose an option: B Finally! They gave a correct answer Scanned with CamScanner Balance Inquiry: when this option is chosen, just print a simple "receipt": +-- | Joiner's Bank, Inc. 1 + --------------------+ Account: BA-3456-78 should line up with the dollar sign below Balance: $ 275.50 Assume the max balance is 99999.99 5 digits before, 2 after the point. Deposit: when this option is chosen, ask for the deposit amount (assume they will enter a float) and print a receipt: Enter deposit amount: 100.00 + ------------------+ + - - - - - - - | Joiner's Bank, Inc. | -----------+ - Account: BA-3456-78 Prev Bal: $ 275.50 Deposit: $ 100.00 New Bal: $ 375.50 Al should line up as shown. All amounts assumed to be 99999.99 or less. Withdrawal: when this option is chosen, ask for the withdrawal amount (assume they will enter a float). Repeat the question as long as the amount entered is greater than the current balance. Then print a receipt: Enter withdrawal amount: 500.00 Insufficient Funds. Current Balance is $ 275.50 Enter withdrawal amount : 100.00 + --------------------- | Joiner's Bank, Inc. 1 --- -- -+ Accoanne BA-4456-78 All should line up as shown. Pres Bal:c$ 1275650 All amounts assumed to be 99999.99 or less. Withdrawn: $ 100.00 + - - - - - - - - - - Nou B1 175 so Withdrawal: when this option is chosen, ask for the withdrawal amount (assume they will enter a float). Repeat the question as long as the amount entered is greater than the current balance. Then print a receipt: Enter withdrawal amount: 500.00 Insufficient Funds. Current Balance is $ 275.50 Enter withdrawal amount: 100.00 +---------------------+ | Joiner's Bank, Inc. | -- - - - + Account: BA-3456-78 Prev Bal: $ 275.50 Withdrawn: $ 100.00 New Bal: $ 175.50 All should line up as shown. Al amounts assumed to be 99999.99 or less. Repeat: after the transaction is complete and the receipt printed, the program should start over at the beginning (printing the logo) for the next customer. Suggestion: Since we won't be covering loops until next week, you can go ahead and start by coding the project assuming: - it won't repeat for multiple customers; do one customer and end program - it won't repeat for an invalid menu option; assume B was entered and continue (You can still print the error message) - It won't repeat for insufficient funds; just let them have a negative balance. (You can still print Scanthe error message) Later, after you learn about loops, you can go back and add the loops to this "mostly done" project. I want to be this code in visual the 2019 studio CS Scanned with CamScanner
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started