title: my geometry program (Calculating area and volume of spheres, cylinders, and cones)
body: <pre><code>public class Geometry {
  
  public static void main(String[] args) {
      input(0.0, 0.0);
      sphereVolume(0.0, 0.0);
      sphereSurface(0.0, 0.0);
      cylinderVolume(0.0, 0.0);
      cylinderSurface(0.0, 0.0);
      coneVolume(0.0, 0.0);
      coneSurface(0.0, 0.0);
      output(0.0, 0.0);
  }
  /**
   * @param radius
   * @param height
   */
  public static void input(double radius, double height) {
  
      Scanner sc = new Scanner(System.in);
  
      System.out.print("Enter radius r: ");
      radius = sc.nextInt();
  
      System.out.print("Enter height h: ");
      height = sc.nextInt();
  }
  
  public static double sphereVolume(double radius, double height) {
      double volume = (4 / 3) * Math.PI * Math.pow(radius, 3.0);
      return volume;
  }
  
  public static double sphereSurface(double radius, double height) {
      double surface = 4 * Math.PI * Math.pow(radius, 2.0);
      return surface;
  }
  
  public static double cylinderVolume(double radius, double height) {
      double volume = Math.PI * Math.pow(radius, 2.0) * height;
      return volume;
  }
  
  public static double cylinderSurface(double radius, double height) {
      double surface = 2 * Math.PI * radius * height + 2 * Math.PI * Math.pow(radius, 2.0);
      return surface;
  }
  
  public static double coneVolume(double radius, double height) {
      double volume = (1 / 3) * Math.PI * Math.pow(radius, 2.0) * height;
      return volume;
  }
  
  public static double coneSurface(double radius, double height) {
      double surface = Math.PI * radius * (radius + Math.pow(( Math.pow(radius, 2.0) + Math.pow(height, 2.0)), .5));
      return surface;
  }
  
  public static void output(double radius, double height) {
      System.out.printf("Volume of sphere: %f\n", sphereVolume(0.0, 0.0));
      System.out.printf("Surface area of Sphere: %f\n", sphereSurface(0.0, 0.0));
      System.out.printf("Volume of cylinder: %f\n", cylinderVolume(0.0, 0.0));
      System.out.printf("Surface area of cylinder: %f\n", cylinderSurface(0.0, 0.0));
      System.out.printf("Volume of cone: %f\n", coneVolume(0.0, 0.0));
      System.out.printf("Surface area of cone: %f\n", coneSurface(0.0, 0.0));
  }
  </code></pre>
  
  <p>My problem is that my output results in 0.0 everytime, regardless of the input.  I'm sure it is probably something simple, but I can't seem to figure it out. Can you please help me out?  Thanks a lot :)  I appreciate your time.</p>
  
  <p>EDIT</p>
  
  <p>So I am still getting 0.0 for my output even though I changed my code like this:</p>
  
  <pre><code>    public static void output(double radius, double height) {
      System.out.printf("Volume of sphere: %.13f\n", sphereVolume(radius, height));
      System.out.printf("Surface area of Sphere: %.13f\n", sphereSurface(radius, height));
      System.out.printf("Volume of cylinder: %.13f\n", cylinderVolume(radius, height));
      System.out.printf("Surface area of cylinder: %.13f\n", cylinderSurface(radius, height));
      System.out.printf("Volume of cone: %.13f\n", coneVolume(radius, height));
      System.out.printf("Surface area of cone: %.13f\n", coneSurface(radius, height));
  }
  </code></pre>
  
  <p>When I am calling my functions in main(), looks like this:</p>
  
  <pre><code>public static void main(String[] args) {
      input(0.0, 0.0);
      sphereVolume(0.0, 0.0);
      sphereSurface(0.0, 0.0);
      cylinderVolume(0.0, 0.0);
      cylinderSurface(0.0, 0.0);
      coneVolume(0.0, 0.0);
      coneSurface(0.0, 0.0);
      output(0.0, 0.0);
  }
  </code></pre>
  
  <p>Do I need to do something different here?</p>