State
Alter an object's behavior when its state changes.
The State pattern provides state-specific logic to a limited set of objects in which each object represents a particular state.
In State pattern, we create objects which represent various states and a context object whose behavior varies as its state object changes.
Last updated
Was this helpful?