@@ -0,0 +1,3868 @@
+//*//******************************************************************************%0A//  Title:  Tetrahedro.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 tetrahedron from an input file.%0A//         Make appropiate calculations for the file using width and length to calculate area and volume.%0A// %0A//******************************************************************************%0A   %0A   %0A//         UML Diagram for this helper class         %0A//          ***********************************************************************************     %0A//Class:      Tetrahedron%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%0Apublic class Tetrahedron extends Triangle%0A%7B%0A   private double height;%0A%0A   //---------------------------------------------------------------------------%0A   //  Sets up the pyramid by entering its base side length and height.%0A   //---------------------------------------------------------------------------%0A   public Tetrahedron (double sid, double hei)%0A   %7B%0A      super(sid);%0A      height = hei;%0A   %7D%0A%0A   //---------------------------------------------------------------------------%0A   //  Returns the double value of the height.%0A   //---------------------------------------------------------------------------%0A   public double getPyramidHeight() %0A   %7B%0A      return height;%0A   %7D%0A%0A   //---------------------------------------------------------------------------%0A   //  Returns the calculated value of a face height.%0A   //---------------------------------------------------------------------------%0A   public double faceHeight() %0A   %7B%0A      return Math.sqrt(Math.pow(height, 2) + Math.pow(getHeight() / 2, 2));%0A   %7D%0A%0A   //---------------------------------------------------------------------------%0A   //  Returns the calculated value of a face area.%0A   //---------------------------------------------------------------------------%0A   public double faceArea() %0A   %7B%0A      return faceHeight() * side / 2;%0A   %7D%0A%0A   //---------------------------------------------------------------------------%0A   //  Returns the calculated value of the surface area.%0A   //---------------------------------------------------------------------------%0A   public double computeArea() %0A   %7B%0A      return 3 * faceArea() + super.computeArea();%0A   %7D%0A%0A   //---------------------------------------------------------------------------%0A   //  Returns the calculated value of the volume.%0A   //---------------------------------------------------------------------------%0A   public double computeVolume() %0A   %7B%0A      return super.computeArea() * height / 3;%0A   %7D%0A%0A   //---------------------------------------------------------------------------%0A   //  Returns pertinent information about the pyramid.%0A   //---------------------------------------------------------------------------%0A   public String toString() %0A   %7B%0A      return %22Tetrahedron: Height is %22 + form.format(height) +%0A             %22%5Cnperimeter of base is %22 + form.format(computePerimeter()) +%0A             %22, area is %22 + form.format(computeArea()) +%0A             %22%5Cnvolume is %22 + form.format(computeVolume()) + %22%5Cn%22;%0A   %7D%0A%7D%0A

Create Tetrahedron.java