Morgan Stanley interview question

When to use composition vs inheritance.