Source: https://members.loria.fr/goster/files/teaching/oop/1314-exam-correction.pdf