State: Introduction
Get a brief introduction to the State design pattern.
We'll cover the following...
The State design pattern allows developers to change the behavior of an object depending on what state the object is in. The public interface of the object, however, remains the same.
We can think of it as being analogous to a smartphone. When the phone is in a locked ...