Source: https://www.emse.fr/~picard/cours/1A/java/heritage.pdf