All pastes #417809 Raw Edit

Mine

public text v1 · immutable
#417809 ·published 2007-03-31 05:07 UTC
rendered paste body
public abstract class BankAccount {
  
    protected double balance;
    protected java.util.List customerList;
    public static final int MAX_OWNER = 2;
    protected static int numOwner;
   
        
    //* creates a bank account with zero balance
    public BankAccount() {
        balance = 0;
    }
    
    //* creates a bank account with a customer and an initial balance
    public BankAccount(Customer customer, double balance) {
        
        this.balance = balance;
    }
     
    //* deposits money into the bank account
    public void deposit(double amount) {
        balance += amount;
    }
        
    public abstract void withdraw(double amount);
    
    //* returns the current balance of the bank account
    public double getBalance() {
        return balance;
    }
    

   	//* obtains information about customers in the bank account
    public String toString() {
        return "BankAccount with balance: $" + balance;
    }
}