note that you cannot namely instantiate
an abstract-class, but you must use a non-abstract extending class or an anonymous instanciation...
Yes, that was the aim. Basically it is for an implementation of a tone generator - at first I had a oscillator interface. As soon as I created another waveform it was more than obvious to keep a majority of the implementation in the oscillator since very little is going to change between the sub classes other than what it thinks is at a particular phase.
In fact the only abstract methods in Oscillator are getAmplitude and createInstance. createInstance
is there so that the abstract Oscillator can still provide implementations to mutable methods. Also I amended the example so that you can not later create an error by doing something like "class Derived extends Abstract<NotDerrived>
Disclaimer: this is not for anything sound related, other than the fact that you could use some principles. It's for a game involving waves!