State
Intent
Allow an object to alter its behavior when its internal state changes
Applicability
an object’s behavior depends on its state
operations have conditional statements that depend on the object’s state
Structure
Context
request1()
request2()
state
State
handle1()
handle2()
ConcreteStateA
handle1()
handle2()
ConcreteStateB
handle1()
handle2()
Client
Previous slide
Next slide
Back to first slide
View graphic version