Posts Tagged: Open Closed Principle

SOLID Made Easy – Open-Closed Principle

After learning about the Single Responsibility Principle, we have the Open-Closed Principle which is the second principle in SOLID. A class should be open for extension but closed for modification. The open-closed principle suggests that when a new functionality is to be implemented we should create another class or object rather than modifying existing code…