資源簡介
本科軟件工程作業(yè),簡單銀行管理系統(tǒng),javaGUI界面,內(nèi)含用戶登錄注冊,管理員模式

代碼片段和文件信息
package?bank;
import?java.text.ParseException;
import?java.text.SimpleDateFormat;
import?java.util.*;
public?class?account{
protected?int?accNo;
protected?int?pin;
protected?Customer?customer;
protected?String?type;
protected?double?money;
protected?double?overDraftlimit=-99999;
protected?double?withdrawlimit=99999;
protected?boolean?isSuspended=false;
protected?boolean?isActive=true;
protected?boolean?noticeNeeded=false;
protected?double?clearmoney;
public?account(int?accNo?String?typeCustomer?customer){
this.accNo=?accNo;
this.customer=?customer;
this.money=0.0;
this.isActive=true;
this.type=type;
generatePin();
}
public?account(String?accNoString?pinString?nameString?addressString?birthString?iscreditedString?typeString?moneyString?clearmoneyString?isSuspendedString?isActiveString?noticeNeeded)?
{
this.accNo=Integer.parseInt(accNo);
this.pin=Integer.parseInt(pin);
this.type=type;
???
????SimpleDateFormat?sdf=?new?SimpleDateFormat(“yyyy-MM-dd“);
????Date?date;
try?{
date?=?sdf.parse(birth);
????Calendar?calendar?=?Calendar.getInstance();
????calendar.setTime(date);
Customer?customer=new?Customer(nameaddresscalendar);
this.customer=customer;
this.money=Double.parseDouble(money);
this.clearmoney=Double.parseDouble(clearmoney);
this.isSuspended=Boolean.parseBoolean(isSuspended);
this.isActive=Boolean.parseBoolean(isActive);
this.noticeNeeded=Boolean.parseBoolean(noticeNeeded);
}?catch?(ParseException?e)?{
//?TODO?自動生成的?catch?塊
e.printStackTrace();
}
}
private?void?generatePin(){
Random?r=?new?Random();
pin=?r.nextInt(900);
}
public?int?getAccNo(){
return?accNo;
}
public?Customer?getCustomer(){
return?customer;
}
public?double?getBalance(){
return?money;
}
public?int?getPin(){
return?pin;
}
public?boolean?isSuspended(){
return?this.isSuspended;
}
public?void?deposit(double?deposit?String?clear){
?if(clear==“clear“)?{
????money+=deposit; ?
?}
?if(clear==“unclear“){
????clearmoney+=deposit;
?}
?}
public?int?withdraw(double?withdrawString?type){
??if(type==“junior“||type.equals(“savor“)){
??if(money>=withdraw&&withdraw<=withdrawlimit){
??money-=withdraw;
??return?0;
??}
??else{
???return?1;?
?
?? ??}
??}
??if(type==“current“){
??if((money-withdraw)>=overDraftlimit){
??this.money=-withdraw;
??
??return?0;
??}
??else{
??return?2;
??}
??
??
??}
return?0; ??
}
public?void?clear(){
??money+=clearmoney;
??clearmoney=0;
}
public?String?toString(){
return?accNo+“?“+pin+“?“+customer.toString()+type+“?“+money+“?“+clearmoney+“?“+isSuspended+“?“+isActive+“?“+noticeNeeded;
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-05-23?10:44??banksystem\
?????目錄???????????0??2016-05-22?10:25??banksystem\banksystem\
?????文件?????????299??2015-05-05?16:06??banksystem\banksystem\.classpath
?????文件?????????384??2015-05-05?16:02??banksystem\banksystem\.project
?????目錄???????????0??2016-05-22?10:25??banksystem\banksystem\.settings\
?????文件?????????598??2015-05-05?16:06??banksystem\banksystem\.settings\org.eclipse.jdt.core.prefs
?????文件??????245504??2015-05-05?16:04??banksystem\banksystem\background.jpg
?????目錄???????????0??2016-05-23?10:48??banksystem\banksystem\bin\
?????目錄???????????0??2016-05-23?10:48??banksystem\banksystem\bin\bank\
?????文件????????2252??2016-05-23?10:48??banksystem\banksystem\bin\bank\Customer.class
?????文件????????3991??2016-05-23?10:48??banksystem\banksystem\bin\bank\account.class
?????文件????????2808??2016-05-23?10:48??banksystem\banksystem\bin\bank\admin$1$1.class
?????文件????????1749??2016-05-23?10:48??banksystem\banksystem\bin\bank\admin$1.class
?????文件????????1792??2016-05-23?10:48??banksystem\banksystem\bin\bank\admin$2$1.class
?????文件????????1749??2016-05-23?10:48??banksystem\banksystem\bin\bank\admin$2.class
?????文件????????2404??2016-05-23?10:48??banksystem\banksystem\bin\bank\admin$3$1.class
?????文件????????1749??2016-05-23?10:48??banksystem\banksystem\bin\bank\admin$3.class
?????文件?????????669??2016-05-23?10:48??banksystem\banksystem\bin\bank\admin$4.class
?????文件?????????658??2016-05-23?10:48??banksystem\banksystem\bin\bank\admin$5.class
?????文件????????2780??2016-05-23?10:48??banksystem\banksystem\bin\bank\admin.class
?????文件????????5151??2016-05-23?10:48??banksystem\banksystem\bin\bank\file.class
?????文件????????2148??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1$1$1.class
?????文件????????1495??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1$1$2.class
?????文件????????2386??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1$1.class
?????文件????????2213??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1$2$1.class
?????文件????????1459??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1$2$2.class
?????文件????????2135??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1$2.class
?????文件????????4887??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1$3.class
?????文件?????????824??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1$4.class
?????文件?????????684??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1$5.class
?????文件????????4139??2016-05-23?10:48??banksystem\banksystem\bin\bank\loginGUI$1.class
............此處省略25個文件信息
評論
共有 條評論