title: Java - Using Accessor and Mutator methods
body: <p>I am working on a homework assignment.  I am confused on how it should be done.</p>
  
  <p>The question is:</p>
  
  <blockquote>
    <p>Create a class called IDCard that contains a person's name, ID number,
    and the name of a file containing the person's photogrpah.  Write
    accessor and mutator methods for each of these fields.  Add the
    following two overloaded constructors to the class:</p>
    
    <p>public IDCard() public IDCard(String n, int ID, String filename)</p>
    
    <p>Test your program by creating different ojbects using these two
    constructors and printing out their values on the console using the
    accessor and mutator methods.</p>
  </blockquote>
  
  <p>I have re-written this so far:</p>
  
  <pre><code>public class IDCard {
  String Name, FileName;
  int ID;
  
  public static void main(String[] args) {
  
  }
  
  public IDCard()
  {
      this.Name = getName();
      this.FileName = getFileName();
      this.ID = getID();
  }
  
  public IDCard(String n, int ID, String filename)
  {
  
  }
  
  public String getName()
  {
      return "Jack Smith";
  }
  
  public String getFileName()
  {
      return "Jack.jpg";
  }
  
  public int getID()
  {
  
          return 555;
      }
  }
  </code></pre>