Trackingindividuals_img1.gif 4. Tracking individuals
The quackologists are happy with the ability to track the behavior of flocks, but they also realize that they want to still be able to find out things about the individual quackers. This brings us back to where we started almost. As we talk to the quackologists we find out that they want to "observe" the quackers to count the individual quacks. This would lead us naturally to implement the observer pattern. The Observer pattern. If you recall, the Observer pattern looks like this:
graphic
This means we have to modify each concrete class to add the attach, detach, and notify methods. This isn't what we really want.