Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
A further extension to your example could be made to reflect the real world. Telephone is a sub-class of a SoundGenerator. Person is a aggregated class and one of it is members is Ear. Ear is an implementation of SoundListener which listens to SoundEvents. SoundEvents have a dB-level attribute of the sound. SoundGenerator has locality so that each Ear should make a calculation to determine if he can hear the sound. It depends on the dB-level, his distance from the source and his own hearing ability. In the real world, there is a medium, namely air, which determine if SoundEvent will reach Ear. There are a lot more external factors that may influence this calculation but it is getting too complex. It just reminds us of how complex the world really is and we are taking it all for granted� Replies:
|
Sponsored Links
|