Medtelligent interview question

Easy OOP related coding question.