Capgemini interview question

mostly on oops concepts