savingaccount.java
来自「电子银行系统」· Java 代码 · 共 36 行
JAVA
36 行
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 + =
减小字号Ctrl + -
显示快捷键?