When to use C++ private inheritance over composition?

Scott Meyers in “Effective C++” item 42 says “Only inheritance gives access to protected members, and only inheritance allows for virtual functions to be redefined. Because virtual functions and protected members exist, private inheritance is sometimes the only practical way to express an is-implemented-in-terms-of relationship between classes.”

Orchestration vs. Choreography

Basic technologies (such as XML, SOAP, WSDL) provide means to describe, locate, and invoke services as an entity in its own right. However, these technologies do not give a rich behavioral detail about the role of the service in more complex collaboration. This collaboration includes a sequence of activities and relationships between activities, which build … Read more

What is composition as it relates to object oriented design?

Composition refers to combining simple types to make more complex ones. In your example, composition could be: Animal: Skin animalSkin Organs animalOrgans Mammal::Animal: Hair/fur mammalFur warm-blooded-based_cirulation_system heartAndStuff Person::Mammal: string firstName string lastName If you wanted to go totally composition (and get rid of all inheritance) it would look like this: Animal: Skin animalSkin Organs animalOrgans … Read more