Liskov Substitution Principle: let be a provable property about objects of type . Then should be true for objects of type , where is a subtype of .

For example, if extends , some method myMethod should act the same on as it does on and we should be able to swap the two. You also cannot change pre or post conditions.

Example Violation: lets say we want to define a Square, if we extend a Rectangle, then we introduce methods such as setLength and setHeight which we do not want. These would have to be prohibited or to introduce side-effects which violates the principle.