/* leave this Unfinished class here... */
class Unfinished extends RuntimeException {
}

/* Replace XYZ with your initials. */

/** XYZRational is an implementation of the Rational interface. 
 *
 * @author <your name here>
 */
public class XYZRational implements Rational {
    
    /* private instance variables */
    private int n;
    private int d;

    /* insert a private "gcd" method, with javadoc comment, here */


    /**
     * constructs a new Rational with value n/d, "reducing" as needed;
     * for example, constructing the Rational 7/14 will reduce to 1/2
     *
     * @param n an int
     * @param d an int
     * @throws IllegalArgumentException if d is 0
     */
    public XYZRational(int n, int d) {
	throw new Unfinished();
    }

    /* I have presented the following methods in a suggested order or implementation */

    /* note that all javadoc comments will "carry over" from the interface
       and need not be reproduced */

    public int num() {
	throw new Unfinished();
    }
    
    public int denom() {
	throw new Unfinished();
    }

    public Rational flipped() {
	throw new Unfinished();
    }
    
    public Rational negated() {
	throw new Unfinished();
    }

    public double numericalApprox() {
	throw new Unfinished();
    }

    public double sqrt() {
	throw new Unfinished();
    }

    public String toString() {
	throw new Unfinished();
    }

    public Rational times(Rational that) {
	throw new Unfinished();
    }

    public Rational dividedBy(Rational that) {
	throw new Unfinished();
    }

    public Rational plus(Rational that) {
	throw new Unfinished();
    }

    public Rational minus(Rational that) {
	throw new Unfinished();
    }

    /* EXTRA CREDIT FROM HERE ON... */

    public Rational raised(int p) {
	throw new Unfinished();
    }

    public int compareTo(Object o) {
	throw new Unfinished();
    }

    public boolean equals(Object o) {
	throw new Unfinished();
    }

}
