Capgemini Interview Question

based on java , oops concepts