Statechart Diagrams
Statechart diagrams, also referred to as State diagrams, are used to document
the various modes ("state") that a class can go through, and the events that
cause a state transition. For example, your television can be in the Off state,
and when the power button is pressed, the television goes into the On state.
Pressing the power button yet again causes a state transition from the On state
to the Off state. In comparison the other behavioral diagrams which model the
interaction between multiple classes, State diagrams typically model the
transitions within a single class.
Notation
| State |
The State notation marks a mode of the entity, and is indicated using a
rectange with rounded corners, and the state name written inside. |

|
| Transition |
A Transition marks the changing of the object State, caused by an event. The
notation for a Transition is an arrow, with the Event Name written above,
below, or alongside the arrow. |

|
| Initial State |
The Initial State is the state of an object before any transitions. For
objects, this could be the state when instantiated. The Initial State is marked
using a solid circle. Only one initial state is allowed on a diagram. |

|
| Final State |
End States mark the destruction of the object who's state we are modeling.
These states are drawn using a solid circle with a surrounding circle. |

|
Here is an example State Diagram that models that status of a user's account in
a Bug Tracker system:

|