[Solved]Textual Menus Work Showing Text Items Item Numbered Menu Would Items 1 N User Makes Choice Q37299769
Textual menus work by showing text items where each item isnumbered. The menu would have items 1 to n.
The user makes a choice, then that causes a function to run, giventhe user made a valid choice. If the choice is invalid an errormessage is shown. Whatever choices was made, after the action ofthat choice happens, the menu repeats, unless the menu option is toquit. Such kind of menus are displayed from the code undermain.
The menu items in this assignment are about simple sample of abank account.
Here are the menu items:
1. Show Balance: the balance info would be stored in a variabledeclared in main
2. Make a Deposit: ask the user for the amount to deposit thencall function Deposit to return the new balance. Deposit uses twoparameters. The first represents the current balance and the secondrepresents the amount to be deposited. The function rejects anydeposit 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 withdrawthen call function Withdraw to return the new balance. Withdrawuses two parameters. The first represents the current balance andthe second represents the amount to be withdrawn.The function rejects any withdrawals of amounts 0 or less, oramounts that cause the balance to be less than 10. Return the newbalance.
4. Quit. In this case show a message: Press Enter to continuethen end the application when the user presses the enter key.
Remember, if the choice made is not 1 to 4, show an errormessage 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 switchstatement. Using break inside a switch statement is always OK toensure the other choices are not considered.
Make sure to add comments to clarify each of the functions youwrite, and add Top Level Comments. Do not comment every line ofcode.
Functions are supposed to be boxes with input/output – nointeraction with the outside world.
Expert Answer
Answer to Textual menus work by showing text items where each item is numbered. The menu would have items 1 to n. The user makes a… . . .
OR

