Cognizant interview question

Inheritence