class Rational {

    Rational(int numerator, int denominator) {
        throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
    }

    int getNumerator() {
        throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
    }

    int getDenominator() {
        throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
    }

    @Override
    public String toString() {
        return String.format("%d/%d", this.getNumerator(), this.getDenominator());
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || !this.getClass().isAssignableFrom(obj.getClass())) {
            return false;
        }

        Rational other = (Rational) obj;
        return this.getNumerator() == other.getNumerator()
            && this.getDenominator() == other.getDenominator();
    }
}

@@ -933,11 +933,244 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public int hashCode() %7B%0A        int prime = 31;%0A        int result = 1;%0A        result = prime * result + this.getNumerator();%0A        result = prime * result + this.getDenominator();%0A%0A        return result;%0A    %7D
 %0A%7D%0A

Add hashCode method to starter solution