public class SavingAccount extends Account { private double interestRate; public SavingAccount(double init_balance,double interest_rate) { super(init_balance); interestRate=interest_rate; } @Override//withdraw()是一个抽象方法 public boolean withdraw(double amount) { if(amount<=balance){balance-=amount;return true;} else return false; }}
添加回答
举报
0/150
提交
取消