Mitrais interview question

OOP related question in any language (basic)