📞 0339-0387701 (WhatsApp) Contact

« Back to Software Engineering (NCCIA)

Which SOLID principle states that software entities should be open for extension but closed for modification?

A. Dependency Inversion Principle
B. Open-Closed Principle ✅
C. Interface Segregation Principle
D. Single Responsibility Principle

Correct Answer: B. Open-Closed Principle

Explanation

  • Open-Closed Principle allows new behaviour via extension
  • Existing tested code need not be modified.