This is a class diagram for the state design pattern
Purpose
Ties object circumstances to its behavior, allowing the object to behave in different ways based upon its internal state.
Use When
- The behavior of an object should be influenced by its state.
- Complex conditions tie object behavior to its state.
- Transitions between states need to be explicit.