I build a class Tool. I inherit from Tool when I make Hammer, Wrench, and Screwdriver.

I inherit from Hammer when I make Ball-Peen, Claw, and Sledge.

If suddenly I make a driveToGroceryStore() method for Tool, it is because I am doing something wrong, not because inheritance is bad.

Don’t Baby.throwOutWith(bathwater The);

Resident of Frogpondia.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store