Capgemini Interview Question

Oops concepts and some basic program question