An object oriented program is to be designed that can print bank statement for a checking account or a savings account. The printed output of each kind of statement will contain the customer's name and address and account number. The current balance will be printed on a separate line. Then each detail line of a statement will show the date, deposit or withdrawal (in separate columns), the amount of the transaction, and the balance after the transaction is processed. For a savings account, the interest earned depends on the interest rate which is the same for all savings accounts. The earned interest is computed simply as the monthly interest rate times the minimum balance in the account for the month. For a checking account, there is no service charge for the first 10 checks. After that there is a service charge of .05 per check. The service charge is shown on a separate line on the checking account statement.
Use the CRC (classes, responsibilities, collaborators) technique to propose a list of classes that could be useful in writing this program. For each of your classes, give:
- its responsibilities
- what other classes it will use (if any); i.e., the collaborators
- For each collaborator of a class, indicate whether the class will have a data member of the type of the collaborator class