Java Reference
In-Depth Information
SOLUTION 9.6
Your diagram should look something like Figure B.11. Note that you can apply the same
design with
Observer
and
Observable
. The key to the design is that the interesting class
Tpeak
makes itself observable by maintaining an object with good listening skills.
Figure B.11. The
Tpeak
class can add in listening behaviors by delegating
listening-oriented calls to a PropertyChange- Support object.