Infosys interview question

Oops concepts and one coding question