What is Observer dependency?

Definition: The Observer Pattern defines a one to many dependency between objects so that one object changes state, all of its dependents are notified and updated automatically . Explanation: One to many dependency is between Subject(One) and Observer(Many).

Read more

What is state pattern used for?

The state pattern is used in computer programming to encapsulate varying behavior for the same object, based on its internal state . This can be a cleaner way for an object to change its behavior at runtime without resorting to conditional statements and thus improve maintainability.

Read more