Answered step by step
Verified Expert Solution
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
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 childrenStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started