A statechart diagram shows the possible states of the object and the transitions that cause a change in state. Our example diagram models the login part of an online banking system. Logging in consists of entering a valid social security number and personal id number, then submitting the information for validation. From each state comes a complete set of transitions that determine the subsequent state. States are rounded rectangles.
Transitions are arrows from one state to another.
Events or conditions that trigger transitions are written beside the arrows. Our diagram has two self-transition, one on Getting SSN and another on Getting PIN . Final states are also dummy states that terminate the action. While in its Validating state, the object does not wait for an outside event to trigger a transition. Instead, it performs an activity.