Open/Closed Principle (OCP)
The Open/Closed Principle (OCP) states that a software module (class, function, or component) should be open for extension but closed for modification. This means that you should be able to add new functionality to a module without changing its existing code. OCP is one of the SOLID principles in object-oriented programming. Why Follow OCP? Avoid […]