/**
 * A class for testing XYZRationals.
 */

public class XYZRationalTester {

    /* make sure you test each Rational method at least once below */
    public static void main(String[] args) {
    
	/* here are a few tests to give you the idea... */
	Rational zero = new XYZRational(0,1);
	Rational oneHalf = new XYZRational(1,2);
	Rational anotherHalf = new XYZRational(9,18);

	/* note: it's good practice to use simple test values for which
	         expected answers are very easy to predict */
	
	/* you can use the Rational Q to perform tests as follows... */
	Rational Q;

	/* 0+0 */
	Q = zero.plus(zero);
	System.out.println(zero + " plus " + zero + " = " + Q);
	
	/* 0+1/2 */
	Q = zero.plus(oneHalf);
	System.out.println(zero + " plus " + oneHalf + " = " + Q);

	/* 1/2 flipped */
	Q = oneHalf.flipped();
	System.out.println(oneHalf + " flipped is " + Q.flipped());

	/* and so on... */
	
    }

}
