-
Composition VS Inheritance in stack’s implementation
To prefer composition over inheritance was the choice of many people I happen to learn a lot from, In many cases, it sounded natural and made sense. With composition, you ensure single responsibility and loosely coupled components of your software. However, if we think that inheritance means “Is A” and composition means “Has A”, It’s…