Capgemini interview question

oops concept