Question: Please solve this for state design pattern. Consider that we must model the state of a carousel door. A carousel is a large, smart rack

Please solve this for state design pattern.

Consider that we must model the state of a carousel door. A carousel is a large, smart rack that accepts material through a doorway and stores the material according to a bar code ID on the material. The door operates with a single button. If the door is closed, clicking the button makes the door start opening. If you click again before the door opens fully, the door will begin closing. If you let the door open all the way, it will automatically begin closing after a 2-second timeout. You can prevent this by clicking again when the door is open and it will stay open until you click again. There are sensors so the system knows when the door is completely open and completely closed.

a) Show with a statechart diagram the operation of the carousel door. Show states, transitions, and guards as may be necessary.

b) Show the class diagram that results when you represent the operation of the carousel door using the State design pattern. Show classes, methods, associations, navigability and multiplicity.

c) Use a sequence diagram to show the messages sent if someone approaches a closed carousel door, clicks the button, and while the door is opening the person clicks the button again

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!