Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

Students also viewed these Databases questions

Question

=+4 How does one acquire a global mindset?

Answered: 1 week ago

Question

=+2 How can the effectiveness of global virtual teams be improved?

Answered: 1 week ago