Open/Closed: Add Features Without Editing Old Code
Extend behaviour through new classes instead of growing if/else chains. Lesson 2 of Level 3: Object-Oriented Design.
Level 3 · Object-Oriented Design · Lesson 2 of 6
Extend behaviour through new classes instead of growing if/else chains.
Continue learning
- Single Responsibility: One Reason to Change — Previous lesson
- Liskov Substitution: Subtypes That Keep Their Promises — Next lesson
- Level 3: Object-Oriented Design — Back to the level