If I want to compare C, D, and E how do I do that with an equals method?
public class Fraction {
/**
* @param args
*/
public static void main(String[] args) {
{
Fraction c, d, e;
c = new Fraction(5, 8);
d = new Fraction(1, 2);
e = new Fraction(5, 8);
if (c.equals(d))
{
System.out.println("c == d");
}
if (c.equals(e))
{
System.out.println("c == e");
}
} // end main
}
}