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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 21:20, FlowerChild1229
For positive constants a and b, the force between two atoms in a molecule is given f(r) = −a r2 + b r3 , where r > 0 is the distance between the atoms. note: a and b are upper case letters. (a) find f '(r) = (b) find the critical point for f(r). r = (c) find f ''(r) = (d) find the value of r so that f ''(r) = 0.
Answers: 1
image
Computers and Technology, 24.06.2019 17:00, rosepetals2938
Carlos, an algebra teacher, is creating a series of powerpoint presentations to use during class lectures. after writing, formatting, and stylizing the first presentation, he would like to begin writing the next presentation. he plans to insert all-new content, but he wants to have the same formatting and style as in the first one. what would be the most efficient way for carlos to begin creating the new presentation? going under the file tab and opening the first presentation, deleting all content from each page, and adding new content going under the file tab and clicking on new in the left pane, then choosing new from existing going under the design tab and clicking on themes, then selecting the theme that was used for the first template going under the design tab and opening the template that was created for the first presentation
Answers: 2
image
Computers and Technology, 24.06.2019 19:00, cxttiemsp021
Luis is cloud-based( microsoft bot framework). true false
Answers: 1
image
Computers and Technology, 24.06.2019 23:30, jinkiesandrosie
Game design colleges anyone know the requirements? ?
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 in other subjects:

Konu
Mathematics, 13.07.2020 19:01