Write a program simulator that will compute for the average waiting time of each customer in a bank. Also the program will indicate the number of the teller who accomodates the customer.
Assume that the bank has 3 teller that may be accomodate the customers. The first customer to arrive will be served by teller 1 and the arrival time is zero(0). The second customer will be served by teller 2, the third customer by teller 3, the fourth customer will be served by the any teller who is already free and so on. The bank is using FIFO in serving their customers.
The length of service depends on the type of service the customer will avail. Services available in the bank are:
Deposit - 5 minutes
New accounts - 8 minutes
Withdrawal - 3 minutes
Check encash - 4 minutes
The program should reord the arrival time of each customer. For simplicity, assumed that the arrival time is in minutes. Again, the first customer will always have an arrival time of 0. Eliminate the concept of several clients that will arrive at exact;y the same time.
The program should be abale to determine the number of customers each teller accommodated.
The waiting time is computed as the time the service is started minus arrival time of the customer. For example, the first customer arrives at 0 and the service also started at time 0 since there is no queque yet. So, the waiting time for customer 1 is 0. If customer 2 arrives at time 5, he will be the first customer for teller 2. The service time will also start at time 5 thus, the waiting time of customer 2 is also 0.
Assume that the bank can serve 20 customers at the most.