📄 savingaccount.java
字号:
package model;import Exception.*;public class SavingAccount extends Account { public SavingAccount(String password, String name, String personId, String email) { super(password, name, personId, email); } public synchronized void withdraw(double money) throws BusinessException.BalanceNotEnoughException { if (this.getBalance() - money >= 0) this.setBalance(this.getBalance() - money); else { throw new BusinessException.BalanceNotEnoughException( "BalanceNotEnoughException--->SavingAccount 您的余额不足 ! "); } } /* * public String toString() { return * this.getName()+"\t"+this.getPersonId()+"\t"+this.getEmail(); } */ public boolean equals(Object o) { return super.equals(o); } @Override public int hashCode() { // TODO Auto-generated method stub return super.hashCode(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -