Question: public class Bank { Scanner scan = new Scanner ( System . in ) ; / / list of bank accounts and customers ArrayList accounts
public class Bank
Scanner scan new ScannerSystemin;
list of bank accounts and customers
ArrayList accounts new ArrayList;
ArrayList customers new ArrayList;
public void addCustomer
read the customer information and add to the list
Customer class automatically generates a digit account number
scan.nextLine; clear the input stream
Systemout.printlnFirst Name?: ;
String fName scan.nextLine;
System.out.printlnLast Name?: ;
String lName scan.nextLine;
System.out.printlnPhone Number?: ;
String pNumber scan.nextLine;
Customer c new CustomerfName, lName, pNumber;
customers.addc;
other bank code
What is the relationship between the Bank class and the Customer class?
Group of answer choices
Dependency
Inheritance
Aggregation
Association
Composition
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
