Capgemini interview question

Problem solving simple oops questions