title: Why do I get zero as the result for my PairTester class?
body: <p>Every time I run my PairTester class I keep getting zero for each result. Can anyone tell me why?</p>
  
  <pre><code>public class Pair {
      private double val1;
      private double val2;
  
      public Pair(double aFirst, double aSecond) {
          aFirst = val1;
          aSecond = val2;
      }
  
      public double getSum() {
          double sum = val1 + val2;
          return sum;
      }
  
      public double getDifference() {
          double difference = val1 - val2;
          return difference;
      }
  
      public double getProduct() {
          double product = val1 * val2;
          return product;
      }
  
      public double getAverage() {
          double average = (val1 + val2) / 2;
          return average;
      }
  
      public double getAbsolute() {
          double absolute = Math.abs(val1 - val2);
          return absolute;
      }
  
      public double getMinimum() {
          double minimum = Math.min(val1, val2);
          return minimum;
      }
  
      public double getMaximum() {
          double maximum = Math.max(val1, val2);
          return maximum;
      }
  }
  </code></pre>
  
  <hr>
  
  <p>This is my tester class:</p>
  
  <pre><code>public class PairTester {
      public static void main(String[] args) {
          Pair myPair = new Pair(11, 15);
          System.out.println("Sum = " + myPair.getSum());
          System.out.println("Difference = " + myPair.getDifference());
          System.out.println("Average = " + myPair.getAverage());
          System.out.println("Absolute = " + myPair.getAbsolute());
          System.out.println("Minimum = " + myPair.getMinimum());
          System.out.println("Maximum = " + myPair.getMaximum());
      }
  }
  </code></pre>