Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 3 of 3
When should you use composition? As a rule of thumb, the presence of either "has" or "have" in specifications indicates the need for composition. For example, "a vehicle has an engine" or "timepieces have digital and analogue displays" indicate composition. By the way, when you browse through object-oriented-programming literature, you'll often come across the term has a relationship. That term originates from the phenomenon of an object having another object. In other words, an object composes another object. And, in a nutshell, that is all there is to composition!
This article explored composition, an object-oriented design concept for building objects from other objects. You learned that composition relates objects to other objects and prevents disconnection between objects that should be intimately related.
Next month's article explores inheritance.