Java project - Sleeping Barber

A barbershop has a cutting room with one chair and a waiting room with five chairs. A limitless number of customers enter the waiting room one at a time if space is available; otherwise they go to another shop. Each time the barber finishes a haircut, the customer must pay at the cash register; only one customer may pay at a time, additional customers waiting to pay must wait, if the cashier is asleep, the paying customer must wake the cashier up, after paying the customer leaves to go to another store, if the cashier has no waiting customers, the cashier falls asleep. A waiting customer, if there is one, enters the cutting room and has a haircut. Customers may enter the waiting room one at a time, or waiting customer may enter the (empty) cutting room one at a time, but these events are mutually exclusive. If the barber discovers that the waiting room is empty, the barber falls asleep in the waiting room. An arriving customer, finding the barber asleep, wakes the barber and has a haircut; otherwise the arriving customer waits.

User must use java semaphores/monitors to coordinate the operation of the barber, clients and the cash register.

Customers are processed in the order that they are seated, earliest has highest priority, except for one condition, a priority customer that has made an appointment, when this customer enters, he/she is now the next customer to get a haircut, all other customers are moved back one, if more than one priority customer enters the shop, he/she is placed behind then last priority customer,(FIFO),

For example assume two priority customers have entered the shop plus 3 regular customers and the left side is next available of the queue. (FIFO)

Entry Times are

Priority customer 1 entered store at 10:01:00

Priority customer 2 entered the store at 10:01:08

Customer 3 entered before customer 4

Customer 4 entered before customer 5

Priority customer 1, priority customer 2, customer 3, customer 4, customer 5

Note: in the case of priority customers, you really can't make a regular customer leave, that would not be nice, so you should extend the queue to support the additional moved back customer (customer is now standing, because there are no chairs), but no more customers may enter until chairs are available.


• The time cutting is random either 1 or 2 seconds

• The simulation must run for at least 2 minutes.

• Customers enter the store between 2 and 4 seconds (randomly selected)

• Cashier takes 1 second cashing out a customer. (randomly selected)

• Priority customers enter between 8-10 seconds.

• Seconds are in whole numbers.

Notes: Must show the following console output

• Status of the barber, clients and cashier when any state changes occur.

• Number of customers at all points, 1 second intervals, (waiting, cutting, sleeping, cashing out, leaving, entering

• When the barber is asleep. (state change awake/sleep sleep/awake)

• When the cashier is asleep. (state change awake/sleep sleep/awake)

• When the chairs are full. (customer turned away, except in the case of priority customers)

• The number of customers waiting to pay

• When a customer enters or leaves the shop

• Total time for each customer from entry to exit

• Priority customers must be marked as such

• Queue length

• Number of customers standing and sitting

include the following also

diagrams and descriptions:

1) Sequence Diagram

2) Class Diagram

3) State Diagram

4) Data Flow Diagram

5) Collaborations and class responsibilities

Beceriler: Java

Daha fazlasını gör: sleeping barber java, java sleeping barber, sleeping barber project, wake up now, user sequence diagram, user case diagrams, user case diagram example, user case diagram, use of use case diagram, use of sequence diagram, use case to class diagram, use case sequence diagrams, use case sequence diagram example, use case sequence diagram, use case sequence, use case extend, use case diagrams include, use case diagrams extend, use case diagrams example, use case diagram sequence diagram, use case diagram of, use case diagram notes, use case diagram include example, use case diagram include and extend example, use case diagram include and extend

İşveren Hakkında:
( 0 değerlendirme ) United States

Proje NO: #4399731

30 freelancers are bidding on average $159 for this job


I can do the program with the diagrams as well

in %bids___i_period_sub_35% gün içinde225%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(273 Değerlendirme)

Hi, I am Java expert and can surely help you here, Thanks

in %bids___i_period_sub_35% gün içinde199%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(170 Değerlendirme)

Hi, I would like to do this project please. Let me know if you are interested so I can start. Thanks.

in %bids___i_period_sub_35% gün içinde70%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(169 Değerlendirme)

Please check your inbox. Thanks

in %bids___i_period_sub_35% gün içinde262%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(64 Değerlendirme)

Dear sir, I am strong in java programming especially in algorithm implementation. I am familiar with synchronization and multi-thread programming and I have deep insight into concurrent and synchronization mechanism Daha Fazla

in %bids___i_period_sub_35% gün içinde71%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(25 Değerlendirme)

can be done.

in %bids___i_period_sub_35% gün içinde180%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(13 Değerlendirme)

I am interested in your project. Please let's me help you

in %bids___i_period_sub_35% gün içinde315%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(13 Değerlendirme)

Hi, I have experience with JAVA and Algorithms. Let me help you. I am ready to start.

in %bids___i_period_sub_35% gün içinde220%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(10 Değerlendirme)

much experiences, please contact me should you need my help, thanks/denial

in %bids___i_period_sub_35% gün içinde165%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(3 Değerlendirme)

Hi I can help you with the solution. I am an experienced Java developer and Computer Science graduate. It is an extension of the classical problem and I already implemented the solution several years back using C++. I Daha Fazla

in %bids___i_period_sub_35% gün içinde150%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(4 Değerlendirme)

I can do this for you, please check PMB.

in %bids___i_period_sub_35% gün içinde150%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(4 Değerlendirme)

The requirements are fairly simple, I can deliver good code&comments and provide support for any question that you may have. Cheers.

in %bids___i_period_sub_35% gün içinde70%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(2 Değerlendirme)

Let expert do it for you. Please check the pmb.

in %bids___i_period_sub_35% gün içinde60%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(2 Değerlendirme)

Hi, i can start right now. Let check your pmb !

in %bids___i_period_sub_35% gün içinde99%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(2 Değerlendirme)

I am a Computer Scientist with strong knowledge in Interprocess Communication. I know the problem very well.

in %bids___i_period_sub_35% gün içinde50%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(1 Yorum)

Hello, I'm a native English speaker with extensive technical experience. I have a degree in Comp Sci and have worked in the industry on lots of Java projects. I can get it done in a few days max.

in %bids___i_period_sub_35% gün içinde250%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(1 Yorum)

i'm ready for this project

in %bids___i_period_sub_35% gün içinde140%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(1 Yorum)

This is very easy task and I can finish it within few days. I am a professional Java and PHP/HTML Web Developer with 6+ years of experience. I am also a Microsoft Certified Professional for Programming in HTML5 with J Daha Fazla

in %bids___i_period_sub_35% gün içinde275%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

I Have more than 6 years experience in java technology.I Have develop many applications in java.i will Show u the demos which u [url removed, login to view] me a chance

in %bids___i_period_sub_35% gün içinde110%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

I am a java + J2EE expert. I am very much comfortable to do this project.

in %bids___i_period_sub_35% gün içinde165%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)