A Fraction is a pair of two integers called numerator and denominator. 

The denominator can't be zero. The following operations are defined: +, -, *, / etc. 

Please design a meaningful Fraction class that work along the lines of this sample code:

public class Fraction {
  // your code here such that the main below produces an output similar to: 

/*

Welcome to DrJava.  Working directory is C:\Users\dgerman\Desktop
> run Fraction
Test of operations: 
  Add: 2/3 + (-2/3) = 0
  Sub: 2/3 - (-2/3) = 4/3
  Mul: 2/3 * (-2/3) = (-4/9)
  Div: 2/3 / (-2/3) = (-1)
Test of predicates: 
  1. Does 2/3 equal (-2/3)?  The answer is: false
  2. Is (-4) an integer? The answer is: true
  3. Does 0 equal 0? The answer is: true
  4. Is 5/8 greater than 2/3? The answer is: false


 * /    
    public static void main(String[] args) {
        Fraction f = new Fraction(6, 9);
        Fraction g = new Fraction(-4, 6);
        System.out.println("Test of operations: ");
        System.out.println("  Add: " + f + " + " + g + " = " + f.plus(g));
        System.out.println("  Sub: " + f + " - " + g + " = " + f.minus(g));
        System.out.println("  Mul: " + f + " * " + g + " = " + f.times(g));
        System.out.println("  Div: " + f + " / " + g + " = " + f.divideBy(g));
        System.out.println("Test of predicates: ");
        System.out.print("  1. Does " + f + " equal " + g + "? ");
        System.out.println(" The answer is: " + f.equals(g));
        Fraction h = new Fraction(8, -2);
        System.out.print("  2. Is " + h + " an integer? ");
        System.out.println("The answer is: " + h.isInt());
        Fraction i, j;
        i = (f.minus(g)).times(f.plus(g));
        j = f.times(f).minus(g.times(g));
        System.out.print("  3. Does " + i + " equal " + j + "? ");
        System.out.println("The answer is: " + i.equals(j));
        System.out.print("  4. Is 5/8 greater than 2/3? The answer is: ");
        System.out.println((new Fraction(5, 8)).greaterThan(new Fraction (2, 3)));

    }
}