Infosys interview question

oops concept as well as a data structure