title: How do I override a method
body: <pre><code>    class TestTax {
      public static void main (String[] args){
          NJTax t = new NJTax();
  
          t.grossIncome= 50000;
          t.dependents= 2;
          t.state= "NJ";
  
          double yourTax = t.calcTax();
          double totalTax = t.adjustForStudents(yourTax);
  
          System.out.println("Your tax is " + yourTax);
      }
  }
  
      class tax {
      double grossIncome;
      String state;
      int dependents;
  
      public double calcTax(){
          double stateTax = 0;
          if(grossIncome &lt; 30000){
              stateTax = grossIncome * 0.05;
          }
          else{
              stateTax = grossIncome * 0.06;
          }
          return stateTax;
      }
  
      public void printAnnualTaxReturn(){
          // code goes here
      }
  }
  
  
  
      public class NJTax extends tax{
      double adjustForStudents (double stateTax){
      double adjustedTax = stateTax - 500;
      return adjustedTax;
  
          public double calcTax(){
  
          }
  
      }
  }
  </code></pre>
  
  <p>I am having trouble with the Lesson requirement to:
  "Change the functionality of calcTax( ) by overriding it in NJTax. The new version of calcTax( ) should lower the tax by $500 before returning the value."</p>
  
  <p>How is this accomplished. I just have safaribooksonline and no videos for the solution.</p>