Source: https://userweb.cs.txstate.edu/~js236/201212/cs4354/java-inheritance-2.pdf