Cognizant interview question

OOP concepts