DEV Community

Discussion on: Liskov Substitution Principle

Collapse
 
amrsaeedhosny profile image
Amr Saeed

Polymorphism is an object-oriented programming concept. This principle is a design principle which uses the OOP concepts such as Polymorphism to achieve a cleaner software design (Object-Oriented Design).

You can use normal classes, abstract ones, or interfaces. The principle isn't stricted to any type of them. Actually I used inheritance for simplicity, as there are many languages that don't support interfaces. You can use interfaces if u won't create objects from the parents, but if it's not the case use normal classes and inheritance.

You have to know that it doesn't change the way the principle is applied.

Collapse
 
vampiire profile image
Vamp

thanks for the thorough response. i hadn’t heard of the LSP before but understood its application in polymorphism.

and thank you for the series it was well written.