Infosys interview question

OOP, basic programming questions