State Charts
Weight 2%
Description: Draw the statechart diagrams for each domain described below.
1. (10 points) Using a statechart diagram, describe the behavior of a simple microwave oven with an analog timer (for setting cook time), light (on when door is open or when cooking), door (can't cook with the door open), and bell (rings when food is done cooking).
2. (5 points) Textually describe the statechart diagram of the microwave oven.
3. (5 points) Describe the modifications necessary to the statechart diagram to add a "popcorn" button.
4. (15 points) Draw a statechart diagram for one lane of a stoplight with the following functionality: from midnight to 6:00am the light blinks yellow; from 6:00am until midnight the stoplight cycles through the normal sequence of green-yellow-red, with the following exception: there exists a weight sensitive left turn lane.
5. (25 points) Draw a state machine for the car radio. Consider only the following buttons/functions: channel presets, twist knobs (2), rewind, stop/eject, fast forward, play/pro, cassette slot, and display.