title: Is factory method appropriate here?
body: <p>I am generating a sequence of <code>Step</code> objects that differ by "Type" and data contained within. e.g:</p>
  
  <p>The <code>Step</code> objects should basically be structs that look like this</p>
  
  <pre><code>{ GRAB, CASCADE_ONE, FACEUP, SOMEOTHERDATA },
  { DROP, DECK,  FACEDOWN, MOREDATA, ANDSOMEMORE },
  { MOVE, 34, 89 },
  </code></pre>
  
  <p>where <code>GRAB</code>, <code>MOVE</code> and <code>DROP</code> indicate <code>StepType</code>:</p>
  
  <pre><code>typedef enum
  {
       GRAB,
       DROP,
       MOVE
  }StepType;
  </code></pre>
  
  <p>As you can see, depending on <code>StepType</code>, these structs each have variable numbers of  data fields after the <code>StepType</code>.</p>
  
  <p>I plan to iterate over a sequence of these structs and perform a particular action based on the <code>StepType</code> field. My first hunch is that these should be objects of classes derived from an abstract <code>Step</code> class - i.e. I should create a <code>GrabStep</code> class, a <code>MoveStep</code> class and a <code>DropStep</code> class.</p>
  
  <p>Is this a good design and if so should I create them using a factory method? If a factory method is the way to go, then how to initialise the fields within the objects?</p>