State Pattern

State design pattern is one of the behavioural design patterns. This pattern is used when an Object changes its behaviour based on its internal state. Example : Assume some electronic device is an object which has 2 states called “ON” and “OFF” This object behaves differently when the state changes. When the state is “ON” […]

Share this article on