Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started