Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**Java or Python code please** You will create a program that will follow the queuing theory of the Barbershop Problem. In this you will use

**Java or Python code please**

You will create a program that will follow the queuing theory of the Barbershop Problem. In this you will use ques and random number generator to complete this project. You will create three queues

Couch - the area where patron will wait just prior to getting their hair cut;

Line - the area where patron will form a line just before reaching the couch; and

Cashier - the area where patrons will line up to pay just before exiting the barbershop and after finishing their haircut.

You will create a container for the barbers chairs (list) . The wait times for the barbers will be random. Barber one will be the fastest and barber three will be the slowest. Randomize the wait times accordingly.

The cashier wait times will also vary randomly.

Barber wait times.

1 second (system time) = 5 minutes

Max time 2 hours

Min time 20 minutes.

Cashier wait time

1 second (system time) = 1 minute

Max time 3 minutes

Min time 1 minute.

*Basically there will be three Barbers and one cashier in the babershop. While each person in line waits for a barber and the last barber will be the slowest with a random time. I would say for the inputs you can enter your name and constantly adding names for wait of the barbers and once done with the barbers customer pays the cashier.

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

Step: 3

blur-text-image

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

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions