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