April 2018
Intermediate to advanced
300 pages
7h 41m
English
As per the Liskov principle, the function that uses the references of derived classes through the base class object must comply with the behavior of the base class.
This means that the child classes should not remove the behavior of the base class since this violates the invariants of it. Typically, the calling code should completely rely on the methods exposed in a base class without knowing its derived implementations.
Let's take an example where we first violate the definition of the Liskov principle and then fix it to learn what it is particularly designed for:

The IMultiFunctionPrinter interface exposes two methods as ...