Hexaware Technologies interview question

Question related to Object oriented programming