Just as an example, if House is the base class, and Colonial is a subclass of House, and Colonial has a method that is goUpstairs. There is another class called Mansion which is also a subclass of House, and Mansion has a method useElevator (say a mansion can have many floors, such as 1 to 35).
Should things start out this way? Or what if after 6 months, there need to be a new class Duplex which is a subclass of House, and also requires a method goUpstairs? If we duplicate the goUpstairs code in Colonial and Duplex, then it is not so DRY (Don’t Repeat Yourself). Should the classes be designed different initially? Or should be it designed differently only after the 6 months and how should it be changed?
I don’t think it is a good idea to build such an inheritance tree. As you stated it come to a permutational explosion
Try using “interfaces”
In java