Question: You will create file rates.txt . In it will be separate lines, one each for account type and its interest rate: ( example ) Cash

You will create file rates.txt. In it will be separate lines, one each for account type and its interest rate: (example)
Cash 0.01
Checking 0.02
Savings 0.25
CDs 5.12
Interest is calculated monthly based on the average daily account balance and is calculated as rate/360*30. To make it easy to calculate, a month has exactly 30 days.
You will create an initial file balances.txt. In it will be separate lines, one each for account type and current balance: (example)
Cash ID 0.00
Checking ID 0.00
Savings ID 0.00
CDs ID 0.00
ID is initially the string ID but can be a string up to 20 characters long containing any combination of letters and digits.
Below is a description of each option in the menu:
Option 1(Deposit money): The program calls a method that displays the current accounts and their balances. Ask the user for the day of the month (1-30). Ask the user if the deposit is into an existing account or a new account.
o If existing, ask which account (by ID) and the amount then add that amount to that account.
o If new, ask which type of account, ID, the amount, and the interest rate. Create the new account within the class with that amount.
Keep a running balance of each account balance by day so that interest can later be calculated.
Option 2(Withdraw money): The program calls a method that displays the current accounts and their balances. Ask the user for the day of the month (1-30). Ask the user from which account (by ID) they wish to make a withdrawal. Keep a running total of each account balance by day so that interest can later be calculated.
Option 3(Check balances): The program calls a method that displays in nice, formatted output, the account type, ID, current balance, and interest rate.
Option 4(Review): Displays all account transactions since balances.txt was last read, by account (all cash transactions, then all checking transactions, etc.).
Option 5(Save): Ask the user for the day of the month (1-30). Update all accounts to reflect interest earned since day 1 of the month, using the daily balances created by options 1 and 2. Write to file balances.txt the account type, ID, balance.
Option 6(Correct ID): Ask the user which ID theyd like to correct. Update the ID to a new value they provide.
Option 7(Quit): The program displays a thank you message and terminates.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!