/** Rectangle.java -- example of a 2-d shape * We say that we are extending the Shape class, where the name attribute * was declared. */ public class Rectangle extends Shape implements TwoD { private double length; private double width; /** Notice that the first thing we do is call super(), which * means we are calling our parent's constructor. */ public Rectangle(String n, double l, double w) { super(n); length = l; width = w; } public double findArea() { return length * width; } }