In: Computer Science
Describe how the Liskov Substitution Principle can influence the way that you might implement the Open Closed Principle in software. (Describe how it might help but also how it might constrain implementations of the OCP.)
A Liskov Substitution
Principle is a concept of OOP that can be used to
improve your design. It refers to base classes must be able to use
objects of the derived class without knowing it.
It extends the Open/Closed Principle by focusing on the behavior of
a superclass and its subtypes.Where,
A Open-closed Principle refers to Objects or entities should be open for extension, but closed for modification.
It simply means
"Open for extension means that we should be able to add new features or components to the application without breaking existing code and Closed for modification means that we should not introduce breaking changes to existing functionality."