Question OOP-SOLID-0023
EasyWhat does the Open/Closed Principle say?
- A.
Classes should be public
- B.
Files should be opened and closed properly
- C.
Code should be open for extension but closed for modification
- D.
Every method should be overridable
Show answer and explanation
Answer: C
New behaviour should be added by adding code, not by editing tested code.