For the sake of an example I have a WAV
class which represents WAV sound files. For convenience' sake, I am then required to add a class called WaveformAudioFile
which has exactly the same functionality.
Regardless of possible design/style issues, what would be an appropriate way to integrate the new class ? By using an extends (with nothing added), by using a common interface or something else ?
Edit: Thinking of this further, if design was to be considered would there be an alternative to avoid redundant code ? I mean writing interfaces would be tiresome if there are several classes. Some sort of pattern that could be used to init. attributes ?