☞ | ![]() ![]() |
40 |
We'll say that an object (or class) has direct and class observers
These groups overlap
In this example, each class and object has exactly one direct observer
$g1 and $g2 are class observers
Alarm has one class observer ($g1) which is also its direct observer
Alarm::Noisy has two class observers ($g1 and $g2)
Only $g2 is a direct observer of Alarm::Noisy
$a1 also has two class observers ($g1 and $g2)
Its direct observer, $g3, is not a class observer
☞ | ![]() |
☞ |