You are not sure that your bank is balancing your checking account (do you have one of those) correctly, so you decide to write a program that will double check this.
Your have a file "checks.dat", that is formatted in the following manner
Your program should read from the file (which will be in the same format but will contain many more lines of mixed deposits and withdraws) and perform the following:
- Print the starting and ending balances
- Print the number of deposits
- Print the number of withdraws
- Print the total of deposits
- Print the total of withdraws.
So for the above file, the output should be
Starting Balance: $100.00
Ending Balance: $110.00
There were 1 deposits for a total of $100.00
There were 2 withdraws for a total of $45.00
Notes:
- make sure you read from the file checks.dat
- Do not assume the file has only three transactions.
- Do not assume the values in the file match the given values.
- The data will be in the correct format.
- There will be at least one transaction.
Required Files
A single java file containing the solution to this problem.
Submission
Submit the assignment to the D2L folder Program 4 by the due date.