Morgan Stanley interview question

generic class code