Infosys Interview Question

oops concept as well as a data structure