title: Calculation returning 0.0
body: <p>I'm having some issues with an assignment for my Java class. My calculation of numCredits * creditFee + addFee is not processing; it continues to return 0.0</p>
  <p>The assignment:</p>
  <p><img src="https://i.stack.imgur.com/ymohJ.png" alt="Assignment Screenshot" /></p>
  <p>(Note, I have not yet added the additional parts of the assignment, the adding and subtracting of 3 credit hours to RegistrationTester. I will add those once I figure out this problem.)</p>
  <p>Here is a look at my code:</p>
  <pre><code>public class Registration {
      //attributes
  private String firstName = &quot;&quot;; 
  private String lastName = &quot;&quot;;
  private double numCredits = 0;
  private double addFee = 0;
  private double creditFee = 70;
  public double balance = 0;
  
  //constructor
  public Registration(String firstName, String lastName, double numCredits, double addFee){
      this.firstName = firstName;
      this.lastName = lastName;
      this.numCredits = numCredits;
      this.addFee = addFee;
  }
  
  public Registration(){} //
   public void balance(double balance){
     System.out.println(numCredits * creditFee + addFee);
   }
     public void addCredit(double addCredit){
     if (this.balance &gt; 0) {
     this.balance = balance + addCredit * creditFee;
     }
     }
     
     public void subCredit(double subCredit){
     if (this.balance &gt; 0){
     this.balance = balance - (subCredit * creditFee);
     }
     }
  //setters
  public void setFirstName(String fname){
      this.firstName = fname;
  }
  public void setLastName(String lname){
      this.lastName = lname;
  }
  public void setNumCredits(double credits){
      this.numCredits = credits;
     }
     public void setAddFee(double fee){
     this.addFee = fee;
     }
     public void setcreditFee(double creditFee){
     this.creditFee = 70;
     }
     public void setBalance(double balance){
     this.balance = balance;
     }
     
      //getters
     
     public String getFirstName(){
     return this.firstName;
     }
     public String getLastName(){
         return this.lastName;
     }
     public double getNumCredits(){
     return this.numCredits;
     }
     public double getAddFee(){
     return this.addFee;
     }
     public double getCreditFee(){
     return this.creditFee;
     }
    public double getBalance(){
        return this.balance;
    }
     
  }
  </code></pre>
  <p>and</p>
  <pre><code>public class RegistrationTester {
      public static void main(String[] args){
      Registration student1 = new Registration (&quot;m&quot;, &quot;w&quot;, 15, 60);
      Registration student2 = new Registration (&quot;d&quot;, &quot;y&quot;, 12, 45);
      
      //display students and their current stats
      
      System.out.printf(&quot;%s %s:%n Current Credit Hours: %f%n Additional Fees: $%.2f%n&quot;
              + &quot;Current balance due: $ %.2f%n&quot;, 
              student1.getFirstName(),student1.getLastName(), student1.getNumCredits(), student1.getAddFee(),
              student1.getBalance());
      System.out.printf(&quot;%s %s:%n Current Credit Hours: %f%n Additional Fees: $%.2f%n&quot;
              + &quot;Current balance due: $ %.2f%n&quot;, 
              student2.getFirstName(), student2.getLastName(), student2.getNumCredits(), student2.getAddFee(),
              student2.getBalance());        
          
  }
  }
  </code></pre>