Skip to content

Files

Latest commit

52d3a59 · Jun 17, 2020

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 16, 2020
Jun 16, 2020
Jun 17, 2020
Jun 16, 2020

State Pattern

State is a behavioral design pattern that lets an object alter its behavior when its internal state changes. It appears as if the object changed its class. source

In this example CarState holds the state of Car.