源码简介: |
设计一个银行业务模拟系统,模拟银行的业务运行并计算一天中客户在银行逗留的平均时间。银行有N 个窗口对外接待客户,从早晨银行开门起不断有客户进入银行。由于每个窗口在某个时刻只能接待一个客户,因此在客户人数多时需在窗口前排队,对于刚进入银行的客户,如果某个窗口的业务员正空闲,则可上任意空闲窗口前办理业务;反之,若N 个窗口均有客户占用,他便会排在人数最少的队伍后面。1) 用户通过人机交互的方式设定程序所需参数:银行的开门时间、关门时间;营业窗口数目。2) 客户的到达时间可通过人机交互、文件导入或随机生成的方式来输入。3) 保存银行营业的工作记录:存储客户的到达时间、离开时间。4) 显示出在某一天中整个银行系统中客户在银行逗留的平均时间。-Design a banking simulation system, simulation runs and calculate the bank s business customers a day, the average stay in the bank Time. N windows of foreign banks have received the customer, banks are open from morning onwards, there have been customers into the bank. Since each Window at a time, only to receive a customer, so the number of customers for a long time need to line up in the window for entering the bank Customers, if a window salesman is free, you can handle on any free business before the window the other hand, if the N Window have the customer take up, he would row the smallest team in the back. 1) The user interactive way through the setup process required parameters: the bank opening hours, closing time open window Port number. 2) the customer s arrival time through human-computer interaction, or randomly generated file into a way to enter. 3) save the banking business of the work record: Store customer arrival time, departure time. 4) shows that
|