Observer
Implementation
Several issues related to the implementation of the dependency mechanism are discussed in this section.
-
-
-
-
-
-
-
-
-
Combining the Subject and Observer classes.
Class libraries written in languages that lack multiple inheritance
(like Smalltalk) generally don't define separate Subject and Observer
classes but combine their interfaces in one class. That lets you
define an object that acts as both a subject and an observer without
multiple inheritance. In Smalltalk, for example, the Subject and
Observer interfaces are defined in the root class Object, making them
available to all classes.