@@ -0,0 +1,3547 @@
+//******************************************************************************%0A//  Title:  Rectangle.java       %0A//  Author: Miguel A Rodriguez%0A//  Date:   1/1/2015%0A//  Course: CSC 112-001%0A//******************************************************************************%0A//  Description:%0A//****************%0A//         Read the dimensions of a rectangle from an input file.%0A//         Make appropiate calculations for the file using width and length to calculate area and perimeter.%0A// %0A//******************************************************************************%0A   %0A   %0A//         UML Diagram for this helper class         %0A//          ***********************************************************************************     %0A//Class:      Rectangle%0A//          ***********************************************************************************%0A//Variables&Objects: %0A//            -width:     Double%0A//            -lenght:    Double%0A//            -form:      DecimalFormat%0A//          ************************************************************************************%0A//Methods:%0A//            +Rectangle(double wid, double len)%0A//            +getwidth():  double%0A//            +getlength(): double%0A//            +computeArea(): double%0A//            +computePerimeter(): double%0A//            +toString(): String%0A//          ************************************************************************************* %0A%0A %0Aimport java.text.*;%0A%0Apublic class Rectangle extends Shape%0A%7B%0A   protected double width;%0A   protected double length;%0A   protected static DecimalFormat form = new DecimalFormat(%220.##%22);%0A%0A   //---------------------------------------------------------------------------%0A   //  Sets up the rectangle by entering its width and length.%0A   //---------------------------------------------------------------------------%0A   public Rectangle(double wid, double len) %0A   %7B%0A      width = wid;%0A      length = len;%0A   %7D%0A%0A   //---------------------------------------------------------------------------%0A   //  Returns the double value of the width.%0A   //---------------------------------------------------------------------------%0A   public double getWidth() %0A   %7B%0A      return width;%0A   %7D%0A  %0A   //---------------------------------------------------------------------------%0A   //  Returns the double value of the length.%0A   //---------------------------------------------------------------------------%0A   public double getLength() %0A   %7B%0A      return length;%0A   %7D%0A   %0A   //---------------------------------------------------------------------------%0A   //  Returns the calculated value of the area.%0A   //---------------------------------------------------------------------------%0A   public double computeArea() %0A   %7B%0A      return length * width;%0A   %7D%0A%0A   //---------------------------------------------------------------------------%0A   //  Returns the calculated value of the perimeter.%0A   //---------------------------------------------------------------------------%0A   public double computePerimeter() %0A   %7B%0A      return 2 * (length + width);%0A   %7D%0A%0A   //---------------------------------------------------------------------------%0A   //  Returns pertinent information about the rectangle.%0A   //---------------------------------------------------------------------------%0A   public String toString() %0A   %7B%0A      return %22Rectangle: width is %22 + form.format(width) + %0A             %22, length is %22 + form.format(length) +%0A             %22%5Cnperimeter is %22 + form.format(computePerimeter()) +%0A             %22, area is %22 + form.format(computeArea());%0A   %7D%0A%7D%0A

Create Rectangle.java