Reference no: EM1364789
When someone goes to a bank teller machine the person may ask the machine to perform an action from a menu of possible actions. If the user has a savings account and a checking account, write a program to perform one of these tasks as described in the following section.
Deposit into the savings account
Transfer from the savings into the checking account
Withdraw from the checking account.
Name your program bankAccount.c
2 Specifications
There is a Savings and a Checking account. Your program should begin by asking the user to enter the starting amount in the checking and savings accounts.
Your program then requests for an action from a menu with 3 possible options: deposit, transfer or withdraw. If the selected option is not available the program states "Entered selection is not available".
If the selected option is 1, 2, or 3, depending on the option selected by the user, the program then asks for the appropriate amount related to that request. For example if the withdraw option is selected, the program should ask for the withdraw amount like "Enter withdraw amount:", or for transfer it should prompt "Enter the transfer amount" and so on.
If the entered amount is appropriate, the program performs the requested action, and prints the new savings account and checking account balances. If the entered amount is inappropriate, the program prints a message to state "the entered amount is not appropriate for the selected task". Appropriate amounts are defined as follows:
For a withdraw selection, the amount should be positive and it should be less than the available money in the checking account.
For a deposit the amount should be positive. For a transfer, the amount must be positive and not more than the available money in the savings account.