Liskovs substitution principle (LSP)
LSP is an extension of Open Closed principle.
It states that objects of derived class must be completely substitutable for the objects of base class.
If you have a function that takes a base class as argument than it should take the…