
WaveProbably an overkill way of modelling wavelength/frequency, but allows us to model it without worrying about which to use.InterfaceThe published properties would be:
ImplementationThis looks like a very simple object. Obviously we don't need to store both Frequency and Wavelength internally. I think it makes sense for a Wave to be immutable (ie it can only be created with a set of characteristics, and thereafter is 'readonly'). The properties are all interdependent, so changing one without the other does not make sense. -- MartinHill - 21 May 2004 |
| ||||||||
| Deleted: | ||||||||
| < < | Not finished (Work in progress) | |||||||
Wave | ||||||||
| Changed: | ||||||||
| < < | Probably an overkill way of modelling wavelength/frequency, but would allow users to work in either interchangably. | |||||||
| > > | Probably an overkill way of modelling wavelength/frequency, but allows us to model it without worrying about which to use. | |||||||
| Changed: | ||||||||
| < < | Implementation | |||||||
| > > | Interface | |||||||
| Changed: | ||||||||
| < < | factory methods: | |||||||
| > > | The published properties would be: | |||||||
| Changed: | ||||||||
| < < | makeFromFreq(frequency) | |||||||
| > > |
| |||||||
| Added: | ||||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < | makeFromWavelength(wavelength) | |||||||
| > > | ||||||||
| Changed: | ||||||||
| < < | property getters: | |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < | getFrequency() : Hz (real) | |||||||
| > > | Implementation | |||||||
| Deleted: | ||||||||
| < < | getWavelength() : meters (real) | |||||||
| Changed: | ||||||||
| < < | getUcd() - I think | |||||||
| > > | This looks like a very simple object. Obviously we don't need to store both Frequency and Wavelength internally. | |||||||
| Changed: | ||||||||
| < < | getAccuracy() - I think... | |||||||
| > > | I think it makes sense for a Wave to be immutable (ie it can only be created with a set of characteristics, and thereafter is 'readonly'). The properties are all interdependent, so changing one without the other does not make sense. | |||||||
| Changed: | ||||||||
| < < | ||||||||
| > > | -- MartinHill - 21 May 2004 | |||||||
<--
| ||||||||
WaveProbably an overkill way of modelling wavelength/frequency, but would allow users to work in either interchangably.Implementationfactory methods:makeFromFreq(frequency)
makeFromWavelength(wavelength)
property getters:
getFrequency() : Hz (real)
getWavelength() : meters (real)
getUcd() - I think
getAccuracy() - I think...
<--
|