Method to add a class to an array keeps adding the classes to the first position only
<p>Here is the method    </p>

<pre><code>public void addModuleToStudent(Module aModule)
 {
    int position = 0; 
    if(position &gt; 3)
    {
        System.out.println("Error: Student already has four modules\n");
    }
    else
    {
        moduleArray[position] = aModule;
        position++;
    }
 }
</code></pre>

<p>The problem is that the position doesn't seem to be increment the position variable because when ever I add a module class it occupies the 1st position in the the array and when I add another instead of being added into the second position it overwrites the first.</p>
