The Open-Closed Principle (OCP) is a core concept in object-oriented design. In this article, we will explore what the Open-Closed Principle means and how to you can apply it effectively in your codebase.
The open closed principle is one of the five design principles of object-oriented design. These set of five principles are known as SOLID principles.
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle