9.2. State Machine
A lifecycle is formally expressed as a state machine, comprising:
States. Each state represents a stage in the lifecycle of a typical instance of the class.
Events. Each event represents an incident or indication that a progression is happening.
Transitions. A transition rule specifies what new state is achieved when an object in a given state receives a particular event.
Procedures. A procedure is an activity or operation that must be accomplished when an object arrives in a state. Each state has its own procedure. Procedures comprise actions.
The state machine is represented as a statechart diagram, as defined first in [2]. That is, the statechart diagram is a representation of the underlying semantics defined by the state machine. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access