package proj4; import java.awt.Color; public class ColoredSquare extends ColoredRectangle { public ColoredSquare(int x, int y, Color c, int side) { super(x, y, c, side, side); } public int getSide() { return getWidth(); } public void setSide(int side) { setWidth(side); setHeight(side); } public String toString() { return "Square with side " + getWidth() + " " + "x=" + getX() + ", y=" + getY() + ", filled=" + isFilled() + ", color=" + getColor(); } }