Question: Java The numbers in the Deposits.txt file are the amounts of deposits that were made to a savings account during the month, and the numbers
Java
The numbers in the Deposits.txt file are the amounts of deposits that were made to a savings account during the month, and the numbers in the Withdrawals.txt file are the amounts of withdrawals that were made during the month. Write a program that creates an instance of the SavingsAccount class . The starting balance for the object is 500.00. The annual interest rate should be 4.75%. The program should read the values from the Deposits.txt file and use the objects method to add them to the account balance. The program should read the values from the Withdrawals.txt file and use the objects method to subtract them from the account balance. The program should call the class method to calculate the monthly interest, and then display the ending balance and the total interest earned.
You can download and test your program with the input files provided: Deposits.txt and Withdrawals.txt.
You should submit two class files: Main.java (the main program) and SavingsAccount.java.
View required output
Test Case 1
| Files in the same directory |
|---|
| Deposits.txt 100.00 124.00 78.92 37.55 Withdrawals.txt 29.88 110.00 27.52 12.90 |
The starting balance was: $500.00 The ending balance of the account is: $662.78 The total amount of deposits was: $340.47 The total amount of withdrawals was: $180.30 The total interest earned was: $2.61
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
