Java program for rational numbers
import java.util.Scanner; public class RationalNumbers { public int getNumerator () { return numerator; } public int getDenominator () { return denominator; } public boolean IsEqual(RationalNumbers r1) { if(this.numerator == r1.numerator && denominator == r1.denominator) { return true; } return false; } public boolean IsNotEqual(RationalNumbers r1) { return !(this.IsEqual(r1)); } public boolean IsGreater(RationalNumbers r1) { if(this.ToDouble() > r1.ToDouble()) ...