Favor Composition Over Inheritance

Making code reusable through public class inheritance (PCI) is so convenient and easy that to say it should be avoided may sound a bit heretical. After all, isn’t this what OOP is about? And yet that’s the position I hold. To be clear, by PCI I refer to inheriting from an implementation class, not from…

2