Java Program

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, addition 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 …

Leave a Reply

Your email address will not be published. Required fields are marked *