State Pattern - main players



  • Context
    • A class that maintains an instance of a State that defines the current context and the interface of interest to clients
  • IState
    • Defines an interface for a particular state of the Context
  • StateA and StateB
    • Classes that implement behavior associated with a state of the Context