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