The Open/Closed Principle, a principle of object-oriented programming, emphasises that classes or methods should be designed in a way that allows for extension (adding new functionality) without modification (changing existing code). This principle promotes the idea of designing code that is flexible, maintainable, and resilient to change.
The rationale