What is State Chart Diagram in Software Engineering?
State Chart Diagram:
A State Chart Diagram is normally used to model how the state of an object changes in its lifetime. Statechart diagrams are good at describing how the behaviour of an object changes across use case executions. Statechart diagrams are based on the finite state machine (FSM) formalism. An FSM consists of a finite number of states corresponding to those of the object being modelled. The object undergoes state changes when specific events occur. The FSM formalism existed long before object-oriented technology and has been used for a wide variety of applications.
Basic elements of a State Chart Diagram:
1. Initial state: It represented as a filled circle.
2. Final state: It represented by a filled circle inside a larger circle.
3. State: These are represented by rectangles with rounded corners.
4. Transition: A transition is shown as an arrow between two states. Normally, the name of the event which causes the transition is places alongside the arrow. You can also assign a guard to the transition. A guard is a Boolean logic condition. The transition can take place only if the guard evaluates it to be true.