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 08:00
Two technicians are discussing the common u-joint. technician a says its input and output speeds should be equal. technician b says that it normally has two yokes. which technician is correct?
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
William travels a lot on business purpose. he needs to regularly communicate with his business partner. he also needs to send out weekly reports to his boss while he is traveling. which web-based application best suits william’s needs? (social media, webmail, wiki) is the best web-based application for william. he can access this application via the internet using a (digital cable, fax machine, web browser).
Answers: 1
question
Computers and Technology, 24.06.2019 13:50
Write a program that performs a simple n-body simulation, called "jumping leprechauns." this simulation involves n leprechauns, numberd 1 to n. it maintains a gold value g_i for each leprechaun i, which begins with each leprechaun starting out with a million dollars worth of gold, that is, g_i = 1000000 for each i = 1,. in addition, the simulation also maintains, for each leprachaun,i, a place on the horizon, which is represented as a double-precision floating point number, x_i. in each iteration of the simulation, the simulation processes the leprachauns in order. processing a leprachaun i during its iteration begins by computing a new place on the horizon for i, which is determined by the assignment:
Answers: 3
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
Questions on the website: 13722363