@Test public void createTest() throws Exception { RationalNumber actual = RationalNumber.create(15, 9); RationalNumber expected = new RationalNumber(15, 9); Assert.assertEquals(expected, actual); }
public static RationalNumber create(int numerator, int denominator) { return new RationalNumber(numerator, denominator); }
RationalNumber { public static RationalNumber create(int numerator, int denominator) { return new RationalNumber(numerator, denominator); } }
RationalNumber { public static RationalNumber create(int numerator, int denominator) { return new RationalNumber(numerator, denominator); } RationalNumber(int numerator, int denominator); }
RationalNumber { public static RationalNumber create(int numerator, int denominator) { return new RationalNumber(numerator, denominator); } RationalNumber(int numerator, int denominator); static RationalNumber create(int numerator, int denominator); int getNumerator(); int getDenominator(); void optimize(); String toString(); boolean equals(Object obj); int hashCode(); }
RationalNumber { public static RationalNumber create(int numerator, int denominator) { return new RationalNumber(numerator, denominator); } RationalNumber(int numerator, int denominator); static RationalNumber create(int numerator, int denominator); int getNumerator(); int getDenominator(); void optimize(); String toString(); boolean equals(Object obj); int hashCode();  }