Cognizant interview question

Oops concepts and DBMS SQL query