Cognizant interview question

OOPs concepts