title: java constructor in class cannot be applied to given types
body: <p>I have 2 subclasses: Staff, Student
  they belong to superclass Person.</p>
  
  <p>Here is the code(tasks) which is given by my teacher:</p>
  
  <hr>
  
  <pre><code>public class Person
  {
  
     private String name;
     private int yearOfBirth;
  
     /**
      * Create a person with given name and age.
      */
     Person(String name, int yearOfBirth)
     {
        this.name = name;
        this.yearOfBirth = yearOfBirth;
     }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>class Student extends Person
  {
  
     private String SID;    // student ID number
  
     /**
      * Create a student with no parameters.
      */
  
     Student()
     {
      //task.
     }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public class Staff extends Person
  {
  
     private String roomNumber;
  
     /**
      * Construct a staff member with field values and no pamaeters.
      */
     public Staff()
     {
      //task 
     }
  }
  </code></pre>
  
  <p>I don't know what can I type in order to create an object without parameter.
  It always appears an error like: constructor Person in class Person cannot be applied to given types; required: java.lang.String,int;</p>
  
  <p>I have checked online that there are 2 ways to solve the problem:</p>
  
  <ol>
  <li><p>add a default value in the superclass: <code>Person()//without parameter</code>.</p>
  
  <p>In the subclass Student:</p></li>
  </ol>
  
  <pre class="lang-java prettyprint-override"><code>Student()
    {
    Person astudent = new Student() //I guess.
    }
  </code></pre>
  
  <ol start="2">
  <li>add a super() in the subclass:</li>
  </ol>
  
  <pre class="lang-java prettyprint-override"><code>Student()
   {
    super("xxx")//I guess.
   }
  </code></pre>
  
  <p>I don't know what to do. I an a starter in learning BlueJ.
  Hope anyone can help me. Thank you very much.</p>