title: using Composite Pattern to count the number of people in the world
body: <p>I'm trying to make a Composite Pattern that counts the number of people in the world, the continent, the state... sorry no state but country my bad sorry</p>
  
  <p>Here is the pattern that I follow:<a href="https://i.stack.imgur.com/Us43w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Us43w.png" alt="enter image description here"></a></p>
  
  <p>I did this:</p>
  
  <p><a href="https://i.stack.imgur.com/AKIjk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AKIjk.png" alt="enter image description here"></a></p>
  
  <p>but I am not sure it's right, because can I use <code>leaf -&gt; population</code> ?</p>
  
  <p>Because when I did Composite Pattern for PC so its (PC= component from PC will be Cabinet = composite, from Cabinet will be HDD= leaf and Motherboard = composite, from Motherboard will be RAM = leaf and CPU = leaf). What I want to say every leafs are different and in my diagram are same.</p>
  
  <p>and you think I have something good at least.</p>
  
  <p>Thank you for your answers :)</p>