Infosys interview question

OOPS Concepts.