Accenture interview question

Question on the OOPS concept