Question: public class Bank { Scanner scan = new Scanner ( System . in ) ; / / list of bank accounts and customers ArrayList accounts

public class Bank
{
Scanner scan = new Scanner(System.in);
// 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 4 digit account number
scan.nextLine(); // clear the input stream
System.out.println("First Name?: ");
String f_Name = scan.nextLine();
System.out.println("Last Name?: ");
String l_Name = scan.nextLine();
System.out.println("Phone Number?: ");
String p_Number = scan.nextLine();
Customer c = new Customer(f_Name, l_Name, p_Number);
customers.add(c);
}
// 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 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 Programming Questions!