Question: Supermarket Checkout Simulation Write a program in c++ that simulates a checkout line at a supermarket. Your program should simulate a 12- hour period (720
Supermarket Checkout Simulation Write a program in c++ that simulates a checkout line at a supermarket. Your program should simulate a 12- hour period (720 minutes) and report the statistics requested below. Build your simulation according to the following assumptions: A customer arrives in line every one to four minutes (or there is a chance that a customer arrives at any given minute). No more than one customer will arrive at the same minute. When a customer arrives at the checkout register, it takes at least 1 minute but no more than 4 minutes to service the customer. Use a random number generator to incorporate these assumptions. Use a queue to represent the line, placing the customer's arrival time in the queue. Upon completion of the simulation, report the following statistics: The number of customers served. The average wait time (includes time in line and the take it takes to check out at the register). The longest wait time. The average line length (mean average over every minute of the simulation). The longest line length
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
