Write a checkbook balancing program. The program will read in the following for all checks that were not cashed as of the last time you balanced your checkbook: the number of each check, the amount of the check, and whether or not it has been cashed yet. Use an array with a class base type.
The class should be a class for a check. There should be three member
variables to record the check number, the check amount, and whether or
not the check was cashed. The class for a check will have a member variable of type Money (as defined in Display 11.9) to record the check
amount. So, you will have a class used within a class. The class for a check
should have accessor and mutator functions as well as constructors and
functions for both input and output of a check.
In addition to the checks, the program also reads all the deposits, as well
as the old and the new account balance. You may want another array to
hold the deposits. The new account balance should be the old balance
plus all deposits, minus all checks that have been cashed.
The program outputs the total of the checks cashed, the total of the
deposits, what the new balance should be, and how much this figure
differs from what the bank says the new balance is. It also outputs two
lists of checks: the checks cashed since the last time you balanced your
checkbook and the checks still not cashed. Display both lists of checks in
sorted order from lowest to highest check number. (continued)
If this is a class assignment, ask your instructor if input/output should be
done with the keyboard and screen or if it should be done with files. If it
is to be done with files, ask your instructor for instructions on file names.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.