The standard Java library provides a Comparable interface:
public interface Comparable
Compares this object with another.
\@param other the object to be compared
\@return a negative integer, zero, or a positive integer if this object
is less than, equal to, or greater than, other
public int compareTo(Object other);
Modify the DataSet class of Section 9.1 to accept Comparable objects. With this interface, it is no longer meaningful to compute the average. The DataSet class should record the minimum and maximum data values. Test your modified DataSet class by adding a number of String objects. (The String class implements the Comparable interface.)