State Diagram:
- A State Diagram is a graph whose nodes are states and arcs are transition between the states caused by the event.
- State name must be unique within the scope of state diagram.
- State diagram specifies state sequence caused by an event sequence.
- There are two types of state diagram:
I. Sample State Diagrams
II. One-Shot State Diagrams
Sample State Diagrams
- State diagram with continuous loop.
- Sample state diagram represents object with infinite life.
One-Shot State Diagrams
One-short diagram represent object with finite lives and have initial and final states.
Initial state is entered on creation of an object while entry of final state implies destruction of an object.
Entry points (hollow circles) and exit points (circle enclosing an "x") appear on the state diagram's perimeter and may be named.