Question: Java: A bank system needs to store information about bank Accounts and Customers. The bank supports two different types of accounts (Checking and Savings). All

Java:

A bank system needs to store information about bank Accounts and Customers. The bank supports two different types of accounts (Checking and Savings). All bank accounts have account Number, balance, and date opened. Two Operations are defined for all accounts, makeDeposit() and makeWithdrawal(). Checking accounts have additional attribute for check style and minimum balance. Saving accounts have additional attribute for interest rate and an operation for calculateInterest(). All customers have a name, an address, and a phone number. In addition, a customer can have as many accounts as he needs.

The above specifications have been expanded with new requirements as follows: There are two special types of customers (Personal and Commercial). Commercial customers have additional attributes for credit rating, contact person, and contact person phone. Personal customers have attributes for home phone and work phone. Moreover, expand the model to show that the bank has multiple branches, and each account is serviced by one branch. Naturally, each branch has many accounts.

The task:

1- Create a new Class Diagram for the complete system and submit this diagram.

2- Implement all classes in your diagram using the Java programming language. Implement the relationships as shown in your diagram.

3- Create a simple test program. The name of this test program is Bank.java, it should make use of the above classes. Bank.java should declare an ArrayList to hold all kinds of bank accounts. The test program should utilize the system capabilities; The following are sample operations that demonstrate the systems capabilities:

a. Create a Checking account for a commercial customer in Chicagos branch and add it to the array list

b. Create a separate method to display the customer information and account balance. Call the method on behalf of the customer you created in the previous step.

c. Deposit a $100 into the account you created in a, and then display the new info.

d. Create a Savings account for an individual customer in some branch with initial balance of $100 and interest rate of 10% and add it to the array list.

e. Display the savings account information

f. Make a $100 deposit to the savings account, calculate the interest, then display the information

g. Implement other operations of your choice!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!