So, a situation's come up at work today while refactoring my codebase. I have two classes that each derive from the same base class. The only significant difference between them is what they do at the beginning - one plays an array of audio files, while another plays just a single file. Each has a different set of audio files. The base class prescribes that some sort of auditory introduction is played at the beginning.
I could possibly just make an audio array and put it into the base class. The question is should I?
To be more generic, when should I create a base class and have classes that derive from it and that follow the Liskov substitution principle, as opposed to just having a single class that does whatever those subclasses would have done?