State Pattern

1. Usage Allow an object to change behavior when State changed. implements OOP Final State Machine(FSM) 2. UML class diagram Context is wrapper class – interface to state Define abstract state base class Define state specific behavior in derived state classes maintain pointer to current state in wrapper context class 3. Pros Easier to extend […]