Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a simulation program of the lines at a grocery store. The program will be similar to the car wash simulation, except that there are

Write a simulation program of the lines at a grocery store. The program will be similar to the car wash simulation, except that there are multiple queues instead of one. You might use a vector of queues to simulate the lines. Assume that there are five cashier lines at the grocery store. Customers enter randomly to check out, and then enter the shortest line. If the lines are equal, then the first available line is chosen. Each transaction takes a random amount of time to complete.

Use the car wash simulation in page 401-411 The program provides a simulation of the lines at a grocery store. The program is similar to the car wash simulation from the text but utilizes 5 queues instead of 1 to represent five cashiers with checkout lines. Customers enter the shortest line (queue) to check out. If the lines are of equal size then the customer enters the first line. Transaction times (ringing up customers) are random (within the range of 10 to 600 seconds). When the program is finished running it prints out the number of customers served and the average wait time in seconds. Input The probability (use percentage scale from 1 to 100 where 100 means 1 customer per second) that a new customer arrives during any given second (we assume that, at most, one customer arrives in a second) The total length of time to be simulated (in seconds) Output The number of customers serviced in the simulation The average time that a customer spent in line

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

=+ b. How would the change you describe in part

Answered: 1 week ago