title: Super class method using subclass method
body: <p>sorry for the question being ambiguous, but I found it hard to word the title right.</p>
  
  <p>I have a super class with a method called calculateTotal() and a method called toString().
  I also have a sub class that overrides both method.</p>
  
  <p>The problem I'm having is, when I call toString() from subclass, super.toString() portion returns a string with the value returned from calculateTotal() from subclass.
  Therefore I'm getting same value for Total: and Grand Total:, both being the value of handlingFee added.</p>
  
  <p>To illustrate the problem, here is an example output.</p>
  
  <p>Expected Output: Total: 20, Plus a handling charge of $4, Grand Total: $24</p>
  
  <p>Current Output: Total: 24, Plus a handling charge of $4, Grand Total: $24</p>
  
  <p>Any help or suggestion would be appreciated! Thank you,</p>
  
  <p>Codes:</p>
  
  <p>Super Class: </p>
  
  <pre><code>public class SuperClass {
      private double unitPrice;
      private int quantityOrdered;
  
      public double calculateTotal() {
  
          return unitPrice * quantityOrdered;
      }
  
      public String toString() {
  
          return String.format("\nUnit Price: %.2f\nQuantity Ordered: %d\nTotal: %.2f", unitPrice, quantityOrdered, calculateTotal());
      }
  }
  </code></pre>
  
  <p>Sub Class: </p>
  
  <pre><code>public class SubClass extends SuperClass {
  
      private double handlingFee;
      public double calculateTotal() {
  
          return unitPrice * quantityOrdered + handlingFee;
      }
  
      public String toString() {
  
          return String.format("%s\nPlus a $%.2f handling charge\nGrand Total: $%.2f", super.toString(), handlingFee, calculateTotal());
      }
  }
  </code></pre>