Capgemini Engineering Interview Question

oops concepts and technical questions on loops