title: How to write get and set methods for arrays
body: <p>I'm a bit mixed up. Here is my work so far.</p>
  
  <pre><code>public class CourseYear
  {
      private String courseName;
      private int year;
      private String tutorName;
      private String [] moduleList;
  </code></pre>
  
  <p>The moduleList is to hold 6 modules</p>
  
  <pre><code>public CourseYear()
  {
      courseName = "Default";
      year = 0;
      tutorName = "Joe Bloggs";
      moduleList = new String [5];
  }
  </code></pre>
  
  <p>This is where my problem lies, I'm not sure how to do the array parts:</p>
  
  <pre><code>public void addModule(Module newModule, int index)
  {
      Module = newModule[0];
      Module = newModule[1];
      Module = newModule[2];
      Module = newModule[3];
      Module = newModule[4];
      Module = newModule[5];
  }
  </code></pre>
  
  <p>I have no idea how to do the get methods </p>
  
  <pre><code>public Module getModule(int index)
  {
      return Module[index];
  }
  </code></pre>