The menu items in this assignment are about simple sample of a bank account.
Here are the menu items:
1. Show Balance: the balance info would be stored in a variable declared in main
2. Make a Deposit: ask the user for the amount to deposit then call function Deposit to return the new balance. Deposit uses two parameters. The first represents the current balance and the second represents the amount to be deposited. The function rejects any deposit of 10,000.00 or more, or a deposit amount of 0 or less. Example of the code from main: current_balance = deposit(current_balance,amount)
3. Make a Withdrawal: ask the user for the amount to withdraw then call function Withdraw to return the new balance. Withdraw uses two parameters. The first represents the current balance and the second represents the amount to be withdrawn. The function rejects any withdrawals of amounts 0 or less, or amounts that cause the balance to be less than 10. Return the new balance.
4. Quit. In this case show a message: Press Enter to continue then end the application when the user presses the enter key.
Remember, if the choice made is not 1 to 4, show an error message asking the user to enter numbers 1 to 4, and to try again + Press Enter to continue then repeat the menu.
Do not use goto or break statements.
Menu items are typically processed using a switch statement. Using break inside a switch statement is always OK to ensure the other choices are not considered.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more