![]() We should also ensure that Clients should not know which specific subtype they are calling, nor should they need to know that. ![]() No new exceptions can be thrown by the subtype unless they are part of the existing exception hierarchy.Implementation guidelines : In the process of development we should ensure that Hence we request you to watch the Open Closed Principle tutorial before proceeding. The examples used in this session are related to the open closed principle. This principle is just an extension of the Open Close Principle.This Principle is introduced by Barbara Liskov in 1987 during her conference address on Data abstraction and hierarchy.More formally, the Liskov substitution principle (LSP) is a particular definition of a subtyping relation, called (strong) behavioral subtyping.Which means, Derived types must be completely substitutable for their base types. ![]() In the first video of SOLID Introduction we have understood that L in the SO LID is acronym for Liskov Substitution Principle which is also known as LSP.ĭefinition : Substitutability is a principle in object-oriented programming and it states that, in a computer program, if S is a Subtype of T, then objects of type T may be replaced with objects of type S
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |