文件名称:bankinfo
介绍说明--下载内容均来自于网络,请自行研究使用
客户业务分2种,第一种是申请从银行得到一笔资金,即借款或取款。第2种是向银行投入一笔资金,即存款或还款。银行有2个服务窗口,相应地有2个队列。客户到达银行后先排第一个队。处理每个客户业务时,如果属于第一种,且申请额超出银行现存资金总额尔得不到要求,则立刻排入第2个队等候,直至满足时才离开银行,否则业务处理完后立刻离开银行。没接待完一个第二种业务的客户,则顺序检查和处理(如果可能)第二个队列中的得客户,对能满足的申请者予以满足,不能满足者重新排到第二个队列的队尾。注意,再此检查过程中,一旦银行资金总额少于或等于刚才第一个队列中最后一个客户(第2中业务)被接待之前的数额,或者本次以将第2个队列检查或者处理了一遍,就停止检查(因为此时已不可能还有满足者)转而继续接待第一个队列的客户。任何时刻都只能开一个窗口。假设检查不需要时间。营业时间结束时所有客户立即离开银行。写一个上述银行业务的事件驱动模拟系统,通过模拟方法求出客户在银行内逗留的平均时间。基本要求: 利用动态存储结构实现模拟。-Client s business is divided into two kinds, the first application to get funds from the bank, that loans or withdrawals. The second is to invest a sum of money to the bank deposits or repayment. The bank has two service windows have two queues. Customers arrived at the bank after the first row of the first team. Handle each customer s business, if they are the first, and the application exceeds the Bank of existing funds total Seoul not requirements, then immediately discharged into two teams waiting to leave the bank until only meet, otherwise the business dealt with immediately leaving the bank. Front did not finish a second business customers, sequence checking and processing (if possible) The second queue of customers, to meet the applicant be met and can not meet the re-routed to the second queue team tail. Note, again this inspection process, the total bank funds is less than or equal to the first one in the queue last customer business (2) the amount before the reception, or th
(系统自动生成,下载前可以参看下载内容)
下载文件列表
bankinfo.cpp