code: public Fraction invert() {
          if (numerator == 0) {
              throw new ArithmeticException("Unable to invert zero.");
          }
          if (numerator==Integer.MIN_VALUE) {
              throw new ArithmeticException("overflow: can't negate numerator");
          }
          if (numerator<0) {
              return new Fraction(-denominator, -numerator);
          }
          return new Fraction(denominator, numerator);
      }
docs: <p>Gets a fraction that is the inverse (1/fraction) of this one.</p>
  
  <p>The returned fraction is not reduced.</p>
  
  @return a new fraction instance with the numerator and denominator
  inverted.
  @throws ArithmeticException if the fraction represents zero.