In: Computer Science
Look at the following description of a problem domain: • The bank offers the following types of accounts to its customers: savings accounts, checking accounts, and money market accounts. • Customers are allowed to deposit money into an account (thereby increasing its balance), withdraw money from an account (thereby decreasing its balance), and earn interest on the account. • Each account has an interest rate. 6-72 Object Oriented Design Finding Classes and Their Responsibilities Assume that you are writing an application that will calculate the amount of interest earned for a bank account. a) Identify the potential classes in this problem domain. b) Refine the list to include only the necessary class or classes for this problem. c) Identify the responsibilities of the class or classes. d) Design the UML diagram.
a) The potential classes for the problem are as follows :
1. Bank Class
2. Customer Class
3. Accounts Class
4. Customer Class
5. Address Class
6. Balance Class
7. Savings Account Class
8. Money Market Class
9. Deposit Class
--------------------------------------------------------------------------------------------------------------------------------------
b) Necessary Classes
1. Bank Class
2. Customer Class
3. Accounts Class
--------------------------------------------------------------------------------------------------------------------------------------
c) UML Diagram is as follows :