@Test public void getValue(){ Fraction f = new Fraction(1,2); double value = f.getValue(); assertEquals (0.5, value, 0.0000001); }
public double getValue(){ if (denominator == 0) { throw new IllegalArgumentException(); } return ((double) this.numerator)/this.denominator; }
Fraction { public double getValue(){ if (denominator == 0) { throw new IllegalArgumentException(); } return ((double) this.numerator)/this.denominator; } }
Fraction { public double getValue(){ if (denominator == 0) { throw new IllegalArgumentException(); } return ((double) this.numerator)/this.denominator; } Fraction(int numerator, int denominator); }
Fraction { public double getValue(){ if (denominator == 0) { throw new IllegalArgumentException(); } return ((double) this.numerator)/this.denominator; } Fraction(int numerator, int denominator); double getValue(); double getShiftedValue(int shift); }
Fraction { public double getValue(){ if (denominator == 0) { throw new IllegalArgumentException(); } return ((double) this.numerator)/this.denominator; } Fraction(int numerator, int denominator); double getValue(); double getShiftedValue(int shift);  }