Computers and Technology

Write a supermarket cashier line simulation program based on the queue class implementation that operates under the following rules: 1. The cashier line starts with a single line. 2. If the length of the queue reaches 6, a second cashier line is opened and so on. 3. If the length of a queue reaches zero and 1 minute has passed since the queue length has reached zero then the cashier closes. (print a message: "Cashier Closed") 4. Simulate the following scenarios: (a) Assume the queue is initialized to 3 people at the beginning. People are coming at the rate of 2/min and leaving at the rate of 1/min. What is the status of the queue/queues after 10 minutes (how many queues and how many people in each)?(b) Assume the queue is initialized to 3 people at the beginning. People are coming at the rate of 2/min and leaving at the rate of 3/min. What is the status of the queue/queues after 2 & 5 minutes?(c) Print the number of people in each queue at every minute.(d) You do not have to simulate the queue based on the actual time (no timer is needed). Use the times to calculate what happens to the queue, i. e. what is the enqueue and dequeue rates and them simulate the queues by instantiating the queue objects. Follow through with building a table for case b and implement using queue objects.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 15:00, vdkgknsdg9996
Much has been made of the new web 2.0 phenomenon, including social networking sites and user-created mash-ups. how does web 2.0 change security for the internet? how do secure software development concepts support protecting applications?
Answers: 1
image
Computers and Technology, 22.06.2019 07:30, tinasidell1972
An endless cycle of creation and response on the internet is called
Answers: 1
image
Computers and Technology, 22.06.2019 08:50, najashohatee1234
Can online classes such as gradpoint track your ip location like if im taking a final and i give somebody else my account and they take the final for me will it show where they are taking the final from? and can this be countered with a vpn
Answers: 1
image
Computers and Technology, 22.06.2019 17:30, yoyo9661
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
Do you know the correct answer?
Write a supermarket cashier line simulation program based on the queue class implementation that ope...

Questions in other subjects:

Konu
Mathematics, 03.12.2020 23:50