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
Checking
Savings
CDs
Interest is calculated monthly based on the average daily account balance and is calculated as rate To make it easy to calculate, a month has exactly 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
Checking ID
Savings ID
CDs ID
ID is initially the string ID but can be a string up to characters long containing any combination of letters and digits.
Below is a description of each option in the menu:
Option Deposit money: The program calls a method that displays the current accounts and their balances. Ask the user for the day of the month 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 Withdraw money: The program calls a method that displays the current accounts and their balances. Ask the user for the day of the month 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 Check balances: The program calls a method that displays in nice, formatted output, the account type, ID current balance, and interest rate.
Option Review: Displays all account transactions since balances.txt was last read, by account all cash transactions, then all checking transactions, etc.
Option Save: Ask the user for the day of the month Update all accounts to reflect interest earned since day of the month, using the daily balances created by options and Write to file balances.txt the account type, ID balance.
Option Correct ID: Ask the user which ID theyd like to correct. Update the ID to a new value they provide.
Option 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
