Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

give answers for a and b During current COVID-19 situation, a waiting area in a barbershop has very limited space. There are three barbers, and

give answers for a and b

image text in transcribed

During current COVID-19 situation, a waiting area in a barbershop has very limited space. There are three barbers, and two categories of customer: child and adult. Barbers 1 and 2 cut only the hair of adults, while barber 3 cuts only children's hair. There are 8 waiting spaces. Customers must come alone, except that children must come with one parent, no one is allowed entry if there is no waiting space. One haircut takes 12 minutes, with 1 minute gap before the next customer. Once their hair is cut, customers leave the shop without re-entering the waiting area, children's parents however remain in the waiting area until their child's haircut is complete. The wall on the clock ticks every minute. In the case of a fire alarm, all customers must leave the shop in an orderly fashion. a) List all possible inputs and outputs. b) Write the program structure with sequential programming, including interrupts. Represent your program structure in your preferred diagram method. c) Barber 1 seems to be busier than Barber 2, for example always getting the first adult customer through the door. Modify your program structure to share the work more fairly? d) Based on situation in c), can you improve on the fire alarm exit? e) On a school day Barber 3 will be idle. Can you let him give priority to children, but accept adults if there are no children? During current COVID-19 situation, a waiting area in a barbershop has very limited space. There are three barbers, and two categories of customer: child and adult. Barbers 1 and 2 cut only the hair of adults, while barber 3 cuts only children's hair. There are 8 waiting spaces. Customers must come alone, except that children must come with one parent, no one is allowed entry if there is no waiting space. One haircut takes 12 minutes, with 1 minute gap before the next customer. Once their hair is cut, customers leave the shop without re-entering the waiting area, children's parents however remain in the waiting area until their child's haircut is complete. The wall on the clock ticks every minute. In the case of a fire alarm, all customers must leave the shop in an orderly fashion. a) List all possible inputs and outputs. b) Write the program structure with sequential programming, including interrupts. Represent your program structure in your preferred diagram method. c) Barber 1 seems to be busier than Barber 2, for example always getting the first adult customer through the door. Modify your program structure to share the work more fairly? d) Based on situation in c), can you improve on the fire alarm exit? e) On a school day Barber 3 will be idle. Can you let him give priority to children, but accept adults if there are no children

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

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

What is Ramayana, who is its creator, why was Ramayana written?

Answered: 1 week ago

Question

To solve by the graphical methods 2x +3y = 9 9x - 8y = 10

Answered: 1 week ago