Capgemini interview question

Oops Concepts