Deposit and Withdrawal Files
Use Notepad or another text editor to create a text file named Deposits.txt . The file should contain the following numbers, one per line:
100.00
124.00
78.92
37.55
Next, create a text file named Withdrawals.txt . The file should contain the following numbers, one per line:
29.88
110.00
27.52
50.00
12.90
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 that you wrote in Programming Challenge 10. The starting balance for the object is 500.00. The program should read the values from the Deposits.txt file and use the object’s method to add them to the account balance. The program should read the values from the Withdrawals.txt file and use the object’s 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.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.