Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Science Project Ideas In Health Care Volume 1

Authors: Zemelak Goraga

1st Edition

B0CPX2RWPF, 979-8223791072

More Books

Students also viewed these Databases questions

Question

define a consultant

Answered: 1 week ago