class Rectangle extends Shape { private double width, height; public Rectangle(double x, double y, double width, double height) { move(x, y); this.width = width; this.height = height; } public String toString() { return String.format("(%g, %g)-(%g, %g) ", getX(), getY(), getY()+width, getY()+height); } }