public class Circle extends GeometricObject implements Comparable { private double radius; Circle(String c, double r) { super(c); radius = r; } public double getArea() { return 3.14159*radius*radius; } // The generics feature allows us to use Circle as data type ! public int compareTo( Circle other ) { double diff = this.getArea() - other.getArea(); return (int) Math.signum(diff); } public String toString() { return getColor() + " " + radius; } }