• Use classes to represent states and wrap state-related behaviors.
  • This pattern is a good choice for applications that can be easily modeled with a state machine.
  • Compare to [[Strategy]]
    • State transitions happen over time in the life cycle of a context.
    • [[Strategy]] typically doesn’t change over time after one is selected.