Crédit Agricole interview question

Question about OOP programming and logical question