Cognizant interview question

OOPs concepts and all