The second of the SOLID Principles to cover is the letter O which is the Open-Closed Principle (OCP).
What is the Open-Closed Principle (OCP)? The Open-Closed Principle (OCP) states that “You should be able to extend a classes behavior, without modifying".
The first of the SOLID Principles to cover is the letter S which is the Single Responsibility Principle (SRP).
What is the Single Responsibility Principle (SRP)? The Single Responsibility Principle (SRP) states that “A class should have one, and only one, reason to change.
This is the first of what will be a series of posts on each of The SOLID Principles.
Before we go into details lets look at an overview of the principles.