Рет қаралды 84,511
The only time you should use subtype polymorphism is when you have behavioural variation in the subtypes. I teach two university courses on object oriented programming and I see this problem a lot. Let me explain. RECOMMENDED READING:
🛠️ geni.us/k8KhT3 (Refactoring)
⭐️ geni.us/zzlx (Dependency Injection: Principles, Practices, and Patterns)
💎 geni.us/hNDE (Elegant Objects)
🏛️ geni.us/IBhtLnh (Clean Architecture)
🧩 geni.us/nlbA6 (Head First: Design Patterns)
Read my FREE book on Object Oriented Programming:
🚀 theobjectorientedway.com
Watch next:
• Always Use Interfaces
CONTENTS:
00:00 Thesis
01:16 Example 1
03:28 Example 2
06:25 Example 3
13:26 Summary