5-1
Account
balance=0;
this.balance = balance;
int balance
this.balance = balance;
return balance;
return false;
balance = balance-money;
return true;
balance = balance+money;
String
extends
overdraft
super();
overdraft=0;
CheckingAccount
super(id,balance);
this.overdraft=overdraft;
(getBalance()-money)>=-overdraft
setBalance(getBalance()-money);
5-2
1 public Animal(){}
2 public abstract void eat();
3 public abstract void sleep();
4 public void jump();
5 public JumpCat(){}