The State Pattern - allows an object to alter its behavior when its internal state changes. The object will appear to change its class.
The State and Strategy Patterns have the same class diagrams, but they differ in intent.
- Strategy Pattern typically configures Context classes with a behaviour or algorithm
- State Pattern allows a Context to change its behaviour as the state of the Context changes.