Infosys interview question

Application based question on OOPs