We can ease our pain by delegating the observable behavior to a helper object.
First we create an IObservable intervace. It has the ability to attach, detach, and
notify
observers.Then we make our IQuackable interface include the IObservable interface. That would
look like this:
Notice that the IQuackable interface extends the IObservable interface.
It does not implement it.
Now, anything that implements IQuackable, also must interface IObservable.