subject

In c++! 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-4 minutes, also, each customer is served in random integers intervals of 1-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 2-hour period (120 minutes) using the following algorithm: i wouls also appreciate it if you could use queue as an array and not stacks.1). choose a random integer from 1 to 4 to determine the minute at which the first customer arrives2). at the first customer’s arrival time: a) determine customer’s service timeb) begin servicing the customer; c) schedule arrival time of next customers3). for each minute of the daya) if the next customer arrives, say so, enqueue the customer, and schedule the arrival time of the next customer. b) if the services was completed for the last customer, say so, dequeue next customer to be serviced and determined customer’s service completion time (random integer 1 – 4 added to the current time).now run your simulation for 120 minutes, and answer each of the following: a. what is the maximum number of customers in the queue at any time? b. what is the longest wait any one customer experiences? c. what happens if the arrival interval is changed from 1-4 minutes to 1-3 minutes?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
What allows you to create a wireless connection among your smart devices
Answers: 2
question
Computers and Technology, 23.06.2019 10:00
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
The option enables you to modify a slide element in most presentation applications.
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. what does it indicate when a website displays https instead of http? a. the website is secure. b. there is no secure sockets layer. c. the secure sockets layer is hidden. d. the website is not secure.
Answers: 1
You know the right answer?
In c++! write a program that simulates a checkout line at a supermarket. the line is a queue object...
Questions
question
Mathematics, 02.11.2020 21:10
question
Mathematics, 02.11.2020 21:10
question
Mathematics, 02.11.2020 21:10
question
Social Studies, 02.11.2020 21:10
Questions on the website: 13722366