Accenture interview question

Oops concepts