Answered step by step
Verified Expert Solution
Link Copied!

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 Problem3
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.
4. 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 Problem4
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
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago