Morgan Stanley interview question

OOPs concept