Liskov replacement principle (aka LSP) is torn:
Let q (x) be a property provable with respect to objects x of type T. Then q (y) must be true for objects y of type S, where S is a subtype of T.
I also consider this an IS-A rule. If class B is derived from class A, it must support all the same functions as class A, and not violate its behavior in the process. If something consumes an object of class A, you should be able to pass an object of class B instead, and not interrupt it.
For example, suppose your base class is a Rectangle , and you get the Square class from it. You violated the LSP because the Rectangles may have a width not equal to their length, while a square cannot.
In your case, however, your base class is abstract, so the LSP is not perfect, but I think you understand what I get.
source share