Now, we will now get to know the Observer Design Pattern.
The Observer Pattern is a kind of behavior pattern which is concerned with the assignment of responsibilities between objects. It should be used when an abstraction has two aspects, one dependent on the other, when a change to one object requires changing others, and you don’t know how many objects need to be changed or when an object should be able to notify other objects without making assumptions about who these objects are. In other words, you don’t want these objects tightly coupled.
Via a real life example, you will learn how and when the Singleton design pattern should be used and how to structure your code in order to implement it. You will see how it can lead to elegant solutions to code problems.