subject

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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:00
What are procedures that keep a data base current
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 23.06.2019 00:10
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
question
Computers and Technology, 24.06.2019 00:20
Describe a data structures that supports the stack push and pop operations and a third operation findmin, which returns the smallest element in the data structure, all in o(1) worst-case time.
Answers: 2
You know the right answer?
Write a supermarket cashier line simulation program based on the queue class implementation that ope...
Questions
question
Mathematics, 05.11.2020 15:20
question
Mathematics, 05.11.2020 15:20
question
Computers and Technology, 05.11.2020 15:20
question
History, 05.11.2020 15:20
question
Biology, 05.11.2020 15:20
question
Social Studies, 05.11.2020 15:20
Questions on the website: 13722363