資源簡介
本人的大學畢業設計,當初做的時候頗費n多力氣!

代碼片段和文件信息
/**?Apr?22?2011?8:58:28?PM?李群坤
?*/
package?biz;
import?dao.AccountDao;
import?entity.Account;
import?entity.CreditAccount;
import?entity.SavingAccount;
import?exception.LoginException;
import?exception.RegisterException;
import?exception.TypeException;
public?class?Bank?implements?Ibank?{
AccountDao?FileDao;
public?Bank(?AccountDao?FileDao)?{
super();
this.FileDao=FileDao;
}
//?開戶(密碼、確認密碼、姓名、身份證號、賬戶類型)
public?long?register(String?password?String?password2?String?name
String?personId?int?type)?{
if?((password2.equals(password)))?{
Account?account?=?null;
if?(type?==?0?||?type?==?1)?{
switch?(type)?{
//?0?為儲蓄賬戶
case?0:
account?=?new?SavingAccount();
account.setType(0);
break;
//?1為信用賬戶
case?1:
account?=?new?CreditAccount();
account.setType(1);
break;
}
account.setPassword(password);
account.setName(name);
account.setPersonId(personId);
FileDao.addAccount(account);
return?account.getId();
}?else?{
TypeException?exception?=?new?TypeException();
throw?exception;
}
}?else?{
RegisterException?exception?=?new?RegisterException();
throw?exception;
}
}
//?登錄驗證
public?long?login(long?id?String?password)?{
if?(this.getAccountById(id)?!=?null
&&?this.getAccountById(id).getPassword().equals(password))?{
return?getAccountById(id).getId();
}?else?{
LoginException?exception?=?new?LoginException();
throw?exception;
}
}
//?存款方法
public?void?deposit(long?id?double?i)?{
Account?a=this.getAccountById(id);
a.deposit(i);
FileDao.update(a);
}
//?取款方法
public?void?withdraw(long?id?double?i)?{
Account?a=this.getAccountById(id);
a.withdraw(i);
FileDao.update(a);
}
//?查詢余額
public?double?getBalance(long?id)?{
Account?a=this.getAccountById(id);
return?a.getBalance();
}
//?修改密碼
public?void?setPassword(long?id?String?password)?{
Account?a=this.getAccountById(id);
a.setPassword(password);
FileDao.update(a);
}
//?通過賬戶號獲取用戶
public?Account?getAccountById(long?id)?{
return?FileDao.getAccountById(id);
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????396288??2010-07-14?11:23??畢業設計\BAM設計報告.doc
?????文件??????27136??2011-08-11?15:10??畢業設計\畢業設計(論文)手冊封面.doc
?????文件????????397??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\.classpath
?????文件????????406??2011-05-06?10:10??畢業設計\源代碼\Bank?Account?Management?System\.project
?????文件????????260??2011-05-11?11:44??畢業設計\源代碼\Bank?Account?Management?System\account\100000.xm
?????文件????????266??2011-05-11?11:44??畢業設計\源代碼\Bank?Account?Management?System\account\100001.xm
?????文件????????281??2011-05-13?13:00??畢業設計\源代碼\Bank?Account?Management?System\account\100002.xm
?????文件????????257??2011-05-13?13:34??畢業設計\源代碼\Bank?Account?Management?System\account\100003.xm
?????文件????????257??2011-05-13?13:46??畢業設計\源代碼\Bank?Account?Management?System\account\100004.xm
?????文件???????2474??2011-05-13?13:34??畢業設計\源代碼\Bank?Account?Management?System\bin\biz\Bank.class
?????文件????????401??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\biz\Ibank.class
?????文件????????212??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\dao\AccountDao.class
?????文件???????2317??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\dao\AccountFileDao.class
?????文件???????4527??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\dao\Accountxm
?????文件???????3304??2011-05-13?13:12??畢業設計\源代碼\Bank?Account?Management?System\bin\entity\Account.class
?????文件????????906??2011-05-13?13:34??畢業設計\源代碼\Bank?Account?Management?System\bin\entity\CreditAccount.class
?????文件????????893??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\entity\SavingAccount.class
?????文件???????1915??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\entity\TestAccount.class
?????文件????????628??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\exception\BalanceNotEnoughException.class
?????文件????????554??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\exception\LoginException.class
?????文件????????560??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\exception\RegisterException.class
?????文件????????547??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\exception\TypeException.class
?????文件????????666??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\Test\TestBank.class
?????文件???????5247??2011-05-13?12:38??畢業設計\源代碼\Bank?Account?Management?System\bin\view\TextView.class
?????文件??????????8??2011-05-13?13:46??畢業設計\源代碼\Bank?Account?Management?System\id.txt
?????文件???????2276??2011-05-13?13:34??畢業設計\源代碼\Bank?Account?Management?System\src\biz\Bank.java
?????文件????????681??2011-05-05?18:32??畢業設計\源代碼\Bank?Account?Management?System\src\biz\Ibank.java
?????文件????????332??2011-05-05?18:34??畢業設計\源代碼\Bank?Account?Management?System\src\dao\AccountDao.java
?????文件???????1442??2011-05-06?10:01??畢業設計\源代碼\Bank?Account?Management?System\src\dao\AccountFileDao.java
?????文件???????3276??2011-05-11?11:34??畢業設計\源代碼\Bank?Account?Management?System\src\dao\Accountxm
............此處省略31個文件信息
- 上一篇:易語言識圖模塊
- 下一篇:基于多徑傳輸和多普勒頻移的 瑞利Rayleigh信道的仿真
評論
共有 條評論