Both Greater Comparable
Create a class named
BothGreater that stores two
int values set by the constructor.
Neither should be publicly visible.
BothGreater should also implement the Java
Comparable<BothGreater> interface, returning 1 for a positive result
and -1 for a negative result.
An instance of
BothGreater is greater than a second instance if both
int values are larger, and is lesser
than if both
int values are smaller.
compareTo should return 0.
The instance passed to
compareTo will not be
You will probably need to review the documentation for
Because we are using the type parameter
BothGreater to the
compareTo accepts an
BothGreater as an argument.