Answered step by step
Verified Expert Solution
Question
1 Approved Answer
When you send a file to be printed on a shared printer, it is put onto a print queue with other jobs. Any time before
When you send a file to be printed on a shared printer, it is put onto a print queue with other jobs. Any time before your job prints, you can access the queue to remove it Thus, some queues support a remove operation. Add this method to the queue implementations. The method should expect an item as an argument. It should remove the given item in the queue or raise an exception if the item is not found.
Notes for Problem
When you send a file to be printed on a shared printer, it is put onto a print queue with other jobs. Anytime before your job prints, you can access the queue to remove it Thus, some queues support a remove operation. The remove method should expect an item as an argument. It should remove the given item in the queue or raise an exception if the item is not found. In the
arrayqueue.py file, complete the following: Define the remove method to the ArrayQueue class implementation. In the
linkedqueue.py file, complete the following: Define the remove method to the LinkedQueue class implementation. To test your program run the test method in the
testqueue.py file.
Modify the supermarket checkout simulator so that it simulates a store with many checkout lines. Add the number of cashiers as a new user input. At instantiation, the model should create a list of these cashiers. When a customer is generated, it should be sent to a cashier randomly chosen from the list of cashiers. On each tick of the abstract clock, each cashier should be told to serve its next customer. At the end of the simulation, the results for each cashier should be displayed.
Notes for Problem
Modify the supermarket checkout simulator so that it simulates a store with many checkout lines that have their own cashiers containing the customers processed per cashier, average wait time in each checkout line and the amount of customers left in each checkout line. Add the number of cashiers as a new user input.
In the
cashier.py file, complete the following:
Modify the method:
Maintains a cashier's number with the number as an instance of
Modify the method:
Handles totalCustomerWaitTime as a float type
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started