/* This is a Rectangle class It sets the length and width of the rectangle In addition it calculates the area * */ public class Rectangle { private double width; private double length; // Method that sets the length public void setLength(double newlength) { length = newlength; } // Method that sets the width public void setWidth(double newwidth) { width = newwidth; } // Method that returns a rectangle object's length public double getLength() { return length; } // Method that returns a rectangle object's width public double getWidth() { return width; } // Method that returns a rectangle object's area public double getArea() { return length * width; } }