@@ -0,0 +1,3529 @@
+//******************************************************************************%0A//  Title:  Sphere.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 Sphere from an input file.%0A//         Make appropiate calculations for the file using radius to calculate area and perimeter.%0A// %0A//******************************************************************************%0A   %0A   %0A//         UML Diagram for this helper class         %0A//          ***********************************************************************************     %0A//Class:      Sphere%0A//          ***********************************************************************************%0A//Variables&Objects: %0A//            -radius:     Double%0A//            -form:      DecimalFormat%0A//          ************************************************************************************%0A//Methods:%0A//            +Sphere( double rad)%0A//            +getradius(): double%0A//            +computeSurfacearea(): double%0A//            +computeDiameter(): double%0A//            +toString(): String%0A//            +computeVolume(): double%0A//            +computeCircumference(): double%0A//          *************************************************************************************     %0Aimport java.text.*;%0A%0Apublic class Sphere extends Circle%0A%7B%0A  protected DecimalFormat format = new DecimalFormat(%220.##%22);%0A  %0A  %0A  %0A  //---------------------------------------------------------------------------%0A   //  Sets up the circle by entering its radius%0A   //---------------------------------------------------------------------------%0A   public Sphere( double rad) %0A   %7B%0A      super(rad);%0A    %0A      %0A   %7D%0A%0A   //-------------------------------------------------------------------------%0A   //Computes Diameter%0A  // **************************************************************************%0A   public double computeDiameter() %0A   %7B%0A      return  2 * radius;%0A   %7D%0A%0A     %0A   //---------------------------------------------------------------------------%0A   //  Returns the calculated value of the area.%0A   //---------------------------------------------------------------------------%0A   public double computeSurfacearea() %0A   %7B%0A      return  4*Math.PI * Math.pow(radius, 2);%0A   %7D%0A   //---------------------------------------------------------------------------%0A   //  Returns the calculated value of the perimeter.%0A   //---------------------------------------------------------------------------%0A   public double computeCircumference() %0A   %7B%0A      return 2*Math.PI*radius;%0A   %7D%0A   //-----------------------------------------------------------------------------%0A   //Computes volume%0A   //--------------------------------------------------------------------------------%0A   public double computeVolume() %0A   %7B%0A      return (4/3)* Math.PI*Math.pow(radius,3);%0A   %7D%0A%0A%0A%0A  %0A   //---------------------------------------------------------------------------%0A   //  Returns pertinent information about the circle%0A   //---------------------------------------------------------------------------%0A   public String toString() %0A   %7B%0A      return %22Sphere: diameter is %22 + format.format(computeDiameter()) + %0A             %22, circumference is %22 + format.format(computeCircumference()) +%0A             %22, surface area is %22 + format.format(computeSurfacearea())+%0A             %22 and volume is %22 + format.format(computeVolume());%0A   %7D%0A%7D%0A  %0A %0A

Create Sphere.java