All pastes #424141 Raw Edit

Something

public java v1 · immutable
·published 2007-04-04 16:30 UTC
rendered paste body
public class CheckingAccount extends BankAccount {    private static final double FLAT_CHARGE = 1.5;    private int accountNumber = 10000;    private static int accInc = 0;        public CheckingAccount()     {        super();        accountNumber += accInc++;    }        public CheckingAccount(Customer c, double balance)     {        super(c, balance);        accountNumber += accInc++;    }        public int getAccountNumber()    {    	return accountNumber;    }        public void withdraw(double amount)     {        if ( getBalance() + FLAT_CHARGE > amount )        {            deposit(-1 * amount);            deposit(-1 - FLAT_CHARGE);        }        else System.out.println("You do not have enough money!");     }        public String toString(Customer c)     {        //return "Checking Account #" + accountNumber + " with balance $" + getBalance();        return c.getFirstName();    }}