Source: https://www.archer.ac.uk/training/course-material/2016/01/oofortran_culham/Lectures/L06-InheritanceAndOverloading.pdf