Refer to 0069 for a more in-depth discussion. Generally speaking. composition is a better approach because:
However, inheritance is the only way to go if protected members of a superclass are needed, or when virtual methods of a superclass need to be overriden.
Conceptually, inheritance (the “is a” relationship) is different from composition (the “has a” relationship).