How does substitutability work for polymorphic objects?
Since every instance of a subclass is instance of superclass, (not vice-versa).
We can substitute child class object where a parent class object is expected.
Since every instance of a subclass is instance of superclass, (not vice-versa).
We can substitute child class object where a parent class object is expected.