| | | | | |

Orthogonal Component (3)

Example: Alarm Clock

  • TimeKeeping machine - stand-alone HSM
  • Alarm
  • machine - stand-alone FSM
  • AlarmClock a modified TimeKeeping machine that has an Alarm data member
  • AlarmClock has responsibility:
    - for initializing Alarm
    - for dispatching events to Alarm
    Alarm Clock

Sample Code: Alarm Clock


| | Top of Page | 5. State Design Patterns - 14 of 19