Source: https://dept-info.labri.fr/~narbel/Lect/fun_oop_lecture.pdf