4.7 Observer

There may be times in your application when certain types or objects respond to changes in another object. Wouldn't it be nice if your objects could watch, or observe, other objects and take an action when something happens? If so, let's take a look at the observer pattern.