The Artima Developer Community
Sponsored Link

Legacy Design Forum
Event Generator Idiom

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:

hello world

Posted by hi on January 28, 2002 at 8:37 PM

> > 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´┐Ż
> Abstraction, my friend, abstraction is the key. You also define,
> what the boundries are, during the analysis phase.






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us