You have to imploement it in Test if you insist on calling it that way. Another option is to make it public static and call it with:
Rational.compareRational(r1, r2);
Type: Posts; User: PhHein
You have to imploement it in Test if you insist on calling it that way. Another option is to make it public static and call it with:
Rational.compareRational(r1, r2);
That is not an implementation pof the Comparable interface! Have a look at the method name and signature.
You're extending Number, which is abstract. So you have to implement it's methods. You also forgot to implement Comparable.