title: License Plate Factory
body: <p>I'm having problems with a concept utilizing program in my Java class, its supposed to be relatively simple but I find it difficult.</p>
  
  <p>"Write a class LicensePlateFactory that generates license 
  plates.  Provide a method getNextPlate that returns a unique 
  license plate number (an int).  Use sequential numbers for all 
  license plates created by the LicencePlateFactory, starting from 
  100001.</p>
  
  <p>Write a program that creates a LicensePlateFactory, then 
  obtains from it and displays a dozen consecutive license plates."</p>
  
  <p>My code(looks bad, didn't know what to do after staring at the problem for quite a while):
  The factory:</p>
  
  <pre><code>public class LicensePlateFactory 
  {
      private int k = 100001;
      private int count;
  
      public LicensePlateFactory(int x)
      {
            this.count++;
      }
  
      public static void main(String[] args)
      {
      getnextPlate();
      }
  
      public int getnextPlate()
      {   
      return k + count;
  
      }
  }
  </code></pre>
  
  <p>The program that creates the factory:</p>
  
  <pre><code>public class LicensePlateFactoryRunner 
  {
  
      private LicensePlateFactory fac;
      public LicensePlateFactoryRunner()
      {
          for (int x = 1; x &lt; 13; x++)
          {
          LicensePlateFactory fac = new LicensePlateFactory();
                      System.out.println(LicensePlateFactory.getnextPlate());
          }
      }
  }
  </code></pre>
  
  <p>Perhaps I am forgetting some basic java concepts?</p>