Infosys interview question

OOP concepts