State

Allow an object to alter its behavior when its internal state changes. The object
will appear to change its class.
Applicability
- Need to change an object's behavior when it changes its state
- Operations have large, multipart conditional statements that depend on the object's state
Consequences
- Localizes state-specific behavior and partitions behavior for different states
- Makes state transitions explicit
- State objects can be shared if they have no intrinsic state (see Flyweight).