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