import java.util.List; import java.util.ArrayList; public abstract class BankAccount { protected double balance; List customerList; public static final int MAX_OWNER = 2; protected static int numOwner; //* creates a bank account with zero balance public BankAccount() { //* initialize the arraylist so it's not null customerList = new ArrayList(); this.balance = 0; } //* creates a bank account with a customer and an initial balance public BankAccount(Customer c, double balance) { customerList = new ArrayList(); customerList.add(c); this.balance = balance; } //* add a customer public void addPerson(Customer customer) { customerList.add(customer); } //* returns the number of customers on an account public int getNumCustomer() { return customerList.size(); } //* Obtain a List containing the list of customers owning this bankAccount public List getCustomerList() { return customerList; } //* returns the account number public abstract int getAccountNumber(); //* Deposits money into the bank account public void deposit(double amount) { this.balance += amount; } //* Withdraws money from a bank account public abstract void withdraw(double amount); //* returns the current balance of the bank account public double getBalance() { return this.balance; } //* obtains information about customers in the bank account public String toString() { return "BankAccount with balance: $" + this.balance; } }