The Liskov Substitution Principle states that:
Child classes should never break the parent class' type definitions.
According to this principle, a subclass should override the parent class's methods in a way that does not break functionality from a client's point of view.
According to this principle, if a class is extending another class, the functionality of the child class should not conflict with that of its parent.
We can demonstrate this with the following example:
public class Rectangle { private double length; private double height; public void setLength(double length) { this.length = length; } public void setHeight(double height) { this.height = height; } public double getLength() { return length; } @Override public double getHeight() { return...