All Posts For: SOLID

Sep 19 2012

What is the Liskov Substitution Principle?

The Liskov Substitution Principle (the “L” in SOLID design principles), is a simple, yet powerful concept that can be used to improve your design. It states:

“if S is a subtype of T, then objects of type T in a program may be replaced with objects of type S without altering any of the desirable properties of that program.”

All this really means is that objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.…