State Pattern

Overview

Allow an object to alter its behavior when its internal states changes. The object will appear to change its class.

Participants

State Context

State Abstraction

Concrete State

Parameters

Attribute

Create Pattern Links

Applicability

Use the State pattern in either of the following cases: