State Programming
Why, When
Very often, the response of a function will depend on the state of this object. With this pattern, It's easy to do such a thing ! You just have to write several sub-classes, each per state, inherit the State class and call the setState when the object need to change state.
