Create an array of double with size 30 named transaction History. Initialize this array with 0s. Welcome a user for using the program. Make sure to include `welcome` in your message. Ask what kind of option a user wants. Below are the possible scenarios: If the user types deposit (ignore case), then you should ask how much money he/she wants to deposit to his/her account. Then record this amount as a positive number into the array. If the user types withdraw (ignore case), then you should ask how much money he/she wants to withdraw from his/her account. Then record this amount as a negative number into the array. If the user types print (ignore case), then you should print 3 most recent transactions. In addition you should also print current account balance as well as average deposit amount and average withdrawal amount. If the user types none of the above options, then you should notify user of Unrecognized Option and do nothing. After either deposit or withdraw, you should internally update current account balance. If at any point account balance becomes negative, then notify user of that his/her current account balance is negative and $20 penalty is applied. Ask a user if he/she wants another transaction. Below are the possible scenarios: a. If the user responds with yes (ignore case), then repeat step 2~4. b. If the user responds with no (ignore case), then thank the user for using the program. c. If the user responds with other than yes or no, then notify user that it is Invalid Response then thank the user for using the program.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Get Free Quote!
356 Experts Online