---------------------- asp.net+unity開發、.net培訓、期待與您交流! ---------------------
銀行排程業務系統的題目**與需求闡述
對銀行排程業務系統進行物件導向分析設計
編寫表示號碼管理器的類
編寫表示號碼機器的類
編寫表示業務視窗的類的骨架**
完成表示業務視窗的類的細節**
編寫程式的主類和完成客戶取號功能
* 沒有把vip視窗和快速視窗做成子類,是因為實際業務中的普通視窗可以隨時被設定為vip視窗和快速視窗。
* */
public class servicewindow
public void setwindowid(int windowid)
public void start()}}
});} private void commonservice() catch (interruptedexception e)
long costtime = system.currenttimemillis() - begintime;
system.out.println(windowname + "為第" + number + "個" + type + "客戶完成服務,耗時" + costtime/1000 + "秒!");
}else catch (interruptedexception e)
} }private void expressservice() catch (interruptedexception e)
long costtime = system.currenttimemillis() - begintime;
system.out.println(windowname + "為第" + number + "個" + type + "客戶完成服務,耗時" + costtime/1000 + "秒!");
}else
} private void vipservice() catch (interruptedexception e)
long costtime = system.currenttimemillis() - begintime;
system.out.println(windowname + "為第" + number + "個" + type + "客戶完成服務,耗時" + costtime/1000 + "秒!");
}else
}}customertype
public enum customertype
constants
public class constants
mainclass
public class mainclass
//產生1個vip視窗
servicewindow vipwindow = new servicewindow();
vipwindow.settype(customertype.vip);
vipwindow.start();
//產生1個快速視窗
servicewindow expresswindow = new servicewindow();
expresswindow.settype(customertype.express);
expresswindow.start();
//普通客戶拿號
executors.newscheduledthreadpool(1).scheduleatfixedrate(
new runnable()
}, 0,
constants.common_customer_interval_time,
timeunit.seconds
);//vip客戶拿號
executors.newscheduledthreadpool(1).scheduleatfixedrate(
new runnable()
}, 0,
constants.common_customer_interval_time * 6,
timeunit.seconds
);//快速客戶拿號
executors.newscheduledthreadpool(1).scheduleatfixedrate(
new runnable()
}, 0,
constants.common_customer_interval_time * 2,
timeunit.seconds
);}}
----------------------asp.net+unity開發、.net培訓、期待與您交流! ----------------------
詳細請檢視:
黑馬程式設計師 銀行例項練習
需求 銀行有乙個金庫 有兩個儲戶分別存300元,每次存100,存3次 目的 該程式是否有安全問題 如何有,怎麼解決?如何找問題 1.明確哪些 是多執行緒執行 2.明確共享資料 3.明確多執行緒 中那些語句是操作共享資料的 package test.itheima public class bankd...
黑馬程式設計師 銀行管理系統
target blank asp.net android io開發s target blank net培訓 期待與您交流!專案總結 銀行管理系統這個專案,與我們生活是息息相關的,雖然我們經常去取錢,但是很多細節沒有去重視,通過這次專案我了解到,在用物件導向來設計程式的時候,我們要把整個事情的邏輯弄清...
黑馬程式設計師
asp.net android ios開發 net培訓 期待與您交流!map hashtable 底層是雜湊表資料結構,不可以存入null鍵和null值。該執行緒是同步的,jdk1.0出現,效率低。hashmap 底層是雜湊表資料結構,允許使用null鍵和null值。該集合執行緒是不同步的,將has...