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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:30, shadowsnake
Write a function called checkfactor that takes two arrays of positive numbers, firstnumberrow and secondnumberrow. checkfactor checks if the first entry in firstnumberrow is divisible by the first entry in secondnumberrow, and performs the same operation on the next array elements until all entries have been checked. all the numbers are positive and the number of entries in the arrays are the same. the function should return the identified divisible numbers in two row arrays named firstdivisible and seconddivisible. restrictions: branches or loops should not be used. the code must use the internal mod and logical functions. hint: the mod function should be used to determine if two numbers are divisible. ex: for num1 and num2 if mod(num1,num2) is 0, then the two numbers are divisible. this is matlab
Answers: 2
image
Computers and Technology, 23.06.2019 19:00, nayo2006
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
image
Computers and Technology, 23.06.2019 20:00, shaheedbrown06
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
image
Computers and Technology, 24.06.2019 11:00, abolton04
In three to five sentences, describe how you can organize written information logically and sequentially
Answers: 1
You know the right answer?
Write a supermarket cashier line simulation program based on the queue class implementation that ope...

Questions in other subjects: