Question
C++ Code Scenario A supermarket must have enough cashiers to work during certain hours to ensure that the customers move quickly to cash out. When
C++ Code
Scenario
A supermarket must have enough cashiers to work during certain hours to ensure that the customers move quickly to cash out. When dealing with this type of problem we must consider both the customer and the cashier as objects. We need to know how long a customer is in the queue. The queue time can be randomly generated in a reasonable range of times. One possibility is a time range from 30 seconds to 10 minutes. You will need to consider the probability of being in the queue for each customer. You do not need to have a probability for each customer, just for one or two times of day. For example, a customer who comes in off peak may have a .75 probability of being in line for 2 minutes, one who comes in during peak hours may have a .95 probability of being in line 10 minutes.
Consider the following:
You will have to also consider the probability of the cashier being busy or free to serve another customer.
If more than 6 customers are in a line, then another cashier must open a line and customers must be redistributed.
Your program will need to loop to simulate the passing of a certain amount of time. The store has a total of 9 cash registers and an appropriate number shall be open based criteria of no more than 6 customers in line at a time. If all registers are open then the lines may be longer than 6 customers.
The output of the simulation may be console based or use a GUI interface. Your interface design must be easy to understand and the simulation should run for at least 1 minute in real time. You can choose the amount of simulation time represented by real time. Include that in your output.
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