Morgan Stanley Interview Question

When to use composition vs inheritance.