The State Pattern allows an object to have many different behaviors that are based on its internal state.
Unlike a procedural state machine, the State Pattern represents state as a full-blown class.
The Context gets its behavior by delegating to the current state object it is composed with.
By encapsulating each state into a class, we localize any changes that will need to be made.
The State and Strategy Patterns have the same class diagram, but they differ in intent.
Strategy Pattern typically configures Context classes with a behavior or algorithm.
Share this highlighthttp://www.safaribooksonline.com/a/head-first-design/23847/