This is incorrect because it certainly violates the Liskov replacement principle .
In fact, it seems that you did not understand what the inheritance is for. It is not to eliminate repetitions, at most it is to have a DRY , which is different from not repeating.
First, if you want to eliminate repetition, you must use composition and not inheritance. Inheritance should only be used when there is being a relationship, that is, the derived class must be the same thing as the base class with something else. It should not have anything less, it should not have anything different . Inheritance at most eliminates repetition as a side effect.
Even if the composition is to think about doing it this way, you should probably do a interface segregation , including because he's probably putting things together unrelated.
This is ideal. The pragmatist knows when to break everything and get more benefits than harm.