Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Take the BankAccount Class from the first program and copy it into this program. You will use it as one of the classes in this

Take the BankAccount Class from the first program and copy it into this program. You will use it as one of the classes in this one.

Create a BankCustomer class with 3 BankAccount objects inside it as private variables (of type BankAccount) as well as one customer name (of type String). [The three accounts are for checking, savings, and money market.] The constructors you make are up to you in this BankCustomer class, you can create one or two or more overloaded constructors: full constructor, partial constructor, and/or non-arg constructor. Create getter and setter methods for these four attributes, three BankAccount variables and one String ustomerName, to work with these attributes. Create a method to get total balance of all 3 BankAccount objects.

In main method of BankCustomerTest class file, create two BankCustomers, with their names and all account information and the values in them for the user. Then add 1000 to the checking account of the first one and 500 to the savings account of the second one and print all account information and the values in them for the user to test your new class and working with its internal objects through the outer class.

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

Step: 3

blur-text-image

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

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

1583474013, 978-1583474013

More Books

Students also viewed these Databases questions

Question

Is this investment worthwhile? Why or why not?

Answered: 1 week ago