package lab8; public abstract class Shape implements Comparable { protected String color; protected boolean filled; public String getColor() { return color; } public void setColor(String color) { this.color = color; } public boolean isFilled() { return filled; } public void setFilled(boolean filled) { this.filled = filled; } public Shape(String color, boolean filled) { this.color = color; this.filled = filled; } public Shape() { } @Override public String toString() { return "Shape [color=" + color + ", filled=" + filled + "]"; } public abstract double getArea(); public int compareTo(Shape a) { if (a.getArea() > this.getArea()) { return -1; } if (a.getArea() < this.getArea()) { return 1; } else { return 0; } } }