Pergunta de entrevista da empresa Focused

Simple OOP problems in succession.