The article in english wikipedia "Composition over inheritance" has a lead picture that shows how composition makes it easier to reuse code. This is the simple implementation of that image and it will be updated.
The credit goes to Wikipedia "Composition over inheritance" article contributors. Specially User:Sae1962 @ https://commons.wikimedia.org/wiki/User:Sae1962