NIIT Limited Interview Question

oops concepts