Infosys Interview Question

Basic oops concept