SOLID : Liskov Substitution Principle (Part 2)

In the first part of the post, we visited the core definition of Liskov Substitution principle and took time to understand the problem using an example. In this second part, we would take time to understand some of the governing rules of the principle. The rules that needs to be followed for LSP compliance can … Continue reading SOLID : Liskov Substitution Principle (Part 2)

SOLID : Liskov Substitution Principle (Part 1)

The "L" in SOLID stands for Liskov Substitution Principle, named after Barbara Liskov, who initially introduced in 1987 keynote address. LSP provides guidelines for creating inheritence heirachy where a client can use any class or subclass without breaking the expected behavior. We will begin by looking at the official definition first. If S is a … Continue reading SOLID : Liskov Substitution Principle (Part 1)