Making the Most of Polymorphism with the Liskov Substitution Principle

Designing Subtypes in SOLID Code

In part 2 of the SOLID series, we reviewed how to use the Open/Closed Principle (OCP) to write more maintainable code. In short, we learned that, according to the OCP, objects should be “open for extension” but “closed to modification”. In other words, you should not have to change old code…