Infosys interview question

Basic OOPS concepts