Cognizant Interview Question

Different oops concept