freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

銀行管理系統(tǒng)(編輯修改稿)

2024-09-04 02:19 本頁面
 

【文章內(nèi)容簡介】 personId。// 身份證號 private double balance。// 賬戶余額 private int type。 public int getType() { return type。 } public void setType(int type) { = type。 } public Account(long id, String password, String name, String personId, double balance, int type) { super()。 = id。 = password。 = name。 = personId。 = balance。 = type。 } // 封裝屬性 public long getId() { return id。 } public void setId(long id) { = id。 } public String getPassword() { return password。 } public void setPassword(String password) { = password。 } public String getName() { return name。 } public void setName(String name) { = name。 } public String getPersonId() { return personId。 } public void setPersonId(String personId) { = personId。 } public double getBalance() { return balance。 } public void setBalance(double balance) { = balance。 } // 存款方法 public final void deposit(double i) { (() + i)。 (存款成功!)。 } // 取款方法public abstract void withdraw(double i)。 public Account(long id, String password, String name, String personId, double balance) { super()。 = id。 = password。 = name。 = personId。 = balance。} // 無參構(gòu)造 /** * 把下一個可用的id存放在一個文件中,每創(chuàng)建一個新對象的時候都會讀取這個文件, 獲得新對象的id,并且修改文件中的id,使其加1. */ public Account() { try { Reader r = new FileReader(new File())。 BufferedReader in = new BufferedReader(r)。 String str = ()。 ((str))。 ()。 Writer w = new FileWriter(new File())。 PrintWriter out = new PrintWriter(w)。 long afterId = +1。 (afterId)。 ()。 } catch (NumberFormatException e) { ()。 } catch (FileNotFoundException e) { ()。 } catch (IOException e) { ()。 } }}(2) CreditAccount類:package entity。import 。public class CreditAccount extends Account { public CreditAccount() { super()。 } public CreditAccount(long id, String password, String name, String personId, double balance, int type) { super(id, password, name, personId, balance, type)。 } // 信用賬戶可以透支10000元 public void withdraw(double sum) { if (sum (() + )) { BalanceNotEnoughException exception=new BalanceNotEnoughException()。 throw exception。 } else { (() sum)。 } }}(3)SavingAccount類:/** Apr 22, 2011 8:25:32 PM 李群坤 */package entity。import 。@SuppressWarnings(serial)public class SavingAccount extends Account { public SavingAccount(long id, String password, String name, String personId, double balance, int type) { super(id, password, name, personId, balance, type)。 // TODO Autogenerated constructor stub } // 儲蓄賬戶取款不允許透支 public SavingAccount() { super()。 } public void withdraw(double sum) { if (sum ()) { BalanceNotEnoughException exception=new BalanceNotEnoughException()。 throw exception。 } else { (() sum)。 } }}2. biz包:(1)package biz。import 。import 。import 。import 。import 。import 。import 。public class Bank implements Ibank { AccountDao FileDao。 public Bank( AccountDao FileDao) { super()。 =FileDao。 } // 開戶(密碼、確認(rèn)密碼、姓名、身份證號、賬戶類型) public long register(String password, String password2, String name, String personId, int type) { if (((password))) { Account account = null。 if (type == 0 || type == 1) { switch (type) { // 0 為儲蓄賬戶 case 0: account = new SavingAccount()。 (0)。 break。 // 1為信用賬戶 case 1: account = new CreditAccount()。 (1)。 break。 } (password)。 (name)。 (personId)。 (account)。 return ()。 } else { TypeException exception = new TypeException()。 throw exception。 } } else { RegisterException exception = new RegisterException()。 throw exception。 } } // 登錄驗證 public long login(long id, String password) { if ((id) != null amp。amp。 (id).getPassw
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1