Cognizant Interview Question

oops concepts