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