Cognizant Interview Question

oops concept