OOP & Design Patterns - Open/Closed Principle - Open for Extension, Closed for Modification
Suppose you have a legacy system that violates the Open/Closed Principle by frequently modifying core classes for new features. What is the best strategy to refactor it to comply with OCP without breaking existing functionality?
