Create an array of double with size 30 named transactionHistory. 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:

computer science

Description

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.


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.