Cognizant interview question

Different oops concept