Context (TrafficLight):?
- The TrafficLight class holds the current state and delegates behavior to
the state object. The context can change its state by calling the SetState
method, which updates the current state reference.
the state object. The context can change its state by calling the SetState
method, which updates the current state reference.