Question
Use your queue implementation to simulate a bank with 3 tellers and one line. The time between arrival of customers is a random integer between
Use your queue implementation to simulate a bank with 3 tellers and one line. The time between arrival of customers is a random integer between 1 and 5. When a customer arrives, the customer gets in line. When any of the three tellers is available, the first customer in line goes to that teller. The time to process that customer's transaction is another random integer between 1 and 5.
When the transaction is completed, the customer leaves. Run the simulation for 100 customers. Report the average time the customer waits in the queue. To do this, for each item enqueue, include its time. For each item dequeued, calculate the current time the time entering the queue.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started