NIIT Limited interview question

Basic OOPS concept with real time examples