Infosys interview question

Basic OOPS questions