// Tyler Mi // A class representing a rectangle public class Rectangle extends Shape { private double length; private double width; // Constructs a rectangle with the given length and width public Rectangle(double length, double width) { super("rectangle"); this.length = length; this.width = width; } // Returns the area of the rectangle public double area() { return length * width; } }