title: uml sequence diagram: create objects in a loop
body: <p>In a sequence diagram i am trying to model a loop that creates a bunch of objects. i have found little information online regarding the creation of multiple objects in an SD diagram so i turn to you.</p>
  
  <p>The classes are Deck and Card</p>
  
  <p>Cards are created by fillDeck(), which is called by the constructor of Deck (FYI the objects are stored in an arraylist in Deck). </p>
  
  <p>There are many types of cards with varying properties. Suppose i want 8 cards of type A to be made, 12 of type B and 3 of type C</p>
  
  <p>How would i go about modelling such a thing? this is the idea i have in mind so far, but it is obviously incomplete. </p>
  
  <p>Hope someone can help! thanks!</p>
  
  <pre>
      +------+
      | Deck |
      +------+
         |
      +--+-------+--------------+
      | loop 8x /               |
      +--+-----+   +----------+ |
      |  |-------->| Card(A)  | |
      |  |         +-----+----+ |
      +--+----------------------+
         |               |
      +--+--------+------|-----------------------+
      | loop 12x /       |                       |
      +--+------+        |          +---------+  |
      |  |------------------------->| Card(B) |  |
      |  |               |          +----+----+  |
      |--+---------------------------------------+
      |  |               |               |
      +--+-------+----------------------------------------------+
      | loop 3x /        |               |                      |
      +--+-----+         |               |        +---------+   |
      |  |--------------------------------------->| Card(C) |   |
      |  |               |               |        +----+----+   |
      |--+------------------------------------------------------+
         |               |               |             |
  
  </pre>