title: Java function returning zero as a result
body: <p>First off sorry about the title I could not think how I should title this.  The prompt of the assignment had us calculate the volume and surface area of a pyramid and prism with three different classes(two classes with constructors and one test class), and as the title states I keep getting zero.</p>
  
  <p>Here is the prism class:</p>
  
  <pre><code>public class Prism
  {
  double l;
  double w;
  double h;
  public Prism(double intL, double intW, double intH)
   {
       double l = intL;
       double w = intW;
       double h = intH;
   }
   public double getPrismVolume()
   {
       return l*w*h;
   }    
   public double getPrismSurfaceArea()
   {
       return 2*((l*w)+(h*l)+(h*w));
   }    
  }
  </code></pre>
  
  <p>Here is my Pyramid class:</p>
  
  <pre><code>public class Pyramid
  {
      double b;
      double h;
      public Pyramid(double intB, double intH)
      {
         double b = intB;
         double h = intH;
      } 
      public double getPyramidVolume()
      {
         return (1.0/3.0)*Math.pow(b,2)*h;
      }   
      public double getPyramidSurfaceArea()
      {
          return Math.pow(b,2)+(2*b*h);
      }    
  }
  </code></pre>
  
  <p>Here is my test class:</p>
  
  <pre><code>import java.util.*;
  public class GeometryTest
  {
   public static void main(String[] args)
      {
      Scanner myScanner = new Scanner(System.in);           
      System.out.print("Enter the length of the prism: ");
      String answer1 = myScanner.nextLine();
      double length = Double.parseDouble(answer1);
      System.out.print("Enter the width of the prism: ");
      String answer2 = myScanner.nextLine();
      double width = Double.parseDouble(answer2);
      System.out.print("Enter the height of the prism: ");
      String answer3 = myScanner.nextLine();
      double height = Double.parseDouble(answer3);
      System.out.print("Enter the pyramid's base: ");
      String answer4 = myScanner.nextLine();
      double base = Double.parseDouble(answer4);
      System.out.print("Enter the pyramid's height: ");
      String answer5 = myScanner.nextLine();
      double pyramidHeight = Double.parseDouble(answer5);
      Pyramid aPyramid = new Pyramid(base,pyramidHeight);
      Prism aPrism = new Prism(length,width,height);
      System.out.println("The prism's volume is: " + aPrism.getPrismVolume());
      System.out.println("The prism's surface area is: " + aPrism.getPrismSurfaceArea());
      System.out.println("The pyramid's volume is: " + aPyramid.getPyramidVolume());
      System.out.println("The pyramid's surface area is: " +  aPyramid.getPyramidSurfaceArea());
      }
  }
  </code></pre>