Infosys Interview Question

OOPS concept.