Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code required in python A small grocery store has one checkout. You have been asked to write a program to simulate the grocery store as

Code required in python

A small grocery store has one checkout. You have been asked to write a program to simulate the

grocery store as it checks out customers. YOU ARE REQURED TO USE A QUEUE TO SOLVE THE PROBLEM.

Here are some guidelines:

1. A customer gets to the checkout every 1 5 minutes

2. The checker can process one customer every 5 15

3. The program should find the average wait time for customers and the number of customers left

in the queue

4. Use the random number generator to get values for when customers get to the checkout and

how long the checker will take.

5. You are not required to use classes, but it might make things easier

For Extra Points

Add another checkout. This one should be an express lane in which customers with10 or less items can

use it. Modify the original program so that it now has 2 queues, one for the regular checkout and one

for the express checkout. Express customers arrive at the checkout every 1-2 minutes. The express

checker can process a customer every 2-5 minutes.

You will need to figure out how to determine if the customer is express or not.

The program should print out the same as above plus average wait time for express customers and

number of express customers still in the queue.

You must turn in both programs separately if you do the extra credit.

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

4. Label problematic uses of language and their remedies

Answered: 1 week ago