title: Design patterns: Composite vs. Composition
body: <p>I am finishing a course on design patterns, and while reviewing the notes came across something I missed during the semester: <strong>Composite</strong> vs. <strong>Composition</strong>. What I managed to understand is that composite is when an object actually encapsulates whole objects, while composition is when it only holds pointers to them.</p>
  
  <ol>
  <li>Is this right? Can someone explain this to me a little better?</li>
  <li>When would I prefer one over the other?</li>
  </ol>