Answered You can hire a professional tutor to get the answer.

QUESTION

(Supermarket simulation) Write a program that simulates a checkout line at a supermarket. The line is a queue object. Customers (i.

(Supermarket simulation) Write a program that simulates a checkout line at a supermarket. The line is a queue object. Customers (i.e., customer objects) arrive in random integer intervals of 1 to 4 minutes. Also, each customer is served in random integer intervals of 1 to 4 minutes. Obviously the rates need to be balanced. If the average arrival rate is larger than the average service rate, the queue will grow infinitely. Even with "balanced" rates, randomness can still cause long lines. Run the supermarket simulation for a 12-hour day (720 minutes) using the following algorithms:

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question