My second group presentation is about UML statecharts. I have not used statecharts before but after spending an evening and an afternoon designing a statechart for a lift I have gained a thorough understanding.
In statecharts we have:
- Guard conditions
- Initial and End states
- Internal actions: entry and exit actions
- Internal Transitions
- Completion Transitions
- Composite States: super and sub states
Statecharts attempt to model all states of a single object and how you get from one state to another. Events trigger transitions to other states. Each transition has a guard condition to distinguish itself and each transition may have an action that is performed. When a new state has been entered entry actions may be performed and before a state is exited an exit action may be performed. Whilst a state is active an activity action can be run. When a state is complete a completion transition leads the object into a new state. A completion transition does not have an event name but will include a guard condition and any actions. A state can have a timer function so that after a period of time there will be a transition from one state to another.