Question: Help please with comment the below Java code, what the classes, objects, constructors and methods do. Tnanks! import java.util.ArrayList; import java.util.List; public class Customer {

Help please with comment the below Java code, what the classes, objects, constructors and methods do. Tnanks! import java.util.ArrayList; import java.util.List; public class Customer { List accounts = new ArrayList<>(); int numberOfAccount; int ssn; // new member variable name String name; static int uniqueSSN = 1001; public Customer() { accounts = new ArrayList<>(); numberOfAccount =0; ssn = uniqueSSN++; } public Customer(int ssn,String name) { numberOfAccount =0; this.ssn = ssn; this.name = name; } public int getSSN() { return ssn; } public String getName() { return name; } public void setName(String n) { this.name =n; } public List getAccounts() { return accounts; } public void createAccount(float rate, float amount) { SavingsAccount account = new SavingsAccount(rate,amount); accounts.add(account); numberOfAccount += 1; } public void displayAccount() { for(SavingsAccount account:accounts) { account.print(this.getName()); } } } 

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 Databases Questions!