State Pattern
- we create objects which represent various states and a context object whose behavior varies as its state object changes.
- If we have to change the behavior of an object based on its state, we can have a state variable in the Object. Then use if-else condition block to perform different actions based on the state. State design pattern is used to provide a systematic and loosely coupled way to achieve this through Context and State implementations.