Chapter+8+project

/** VolumeCalculator.java Calculates the volume of a cylinder *

** @author  **  Nick Hazel

*/ import

java.util.Scanner;

public

** class  ** VolumeCalculator {

** public  ****  static  ****  void  ** main (String [] args) {

System.

// out  //.print(  "What is the radius of the cylinder in centimeters?"  );

Scanner keyboard =

** new  ** Scanner(System.//  in  //);  //Recognizes keyboard as input devices.

** double  ** radius = keyboard.nextDouble;  //Recognizes the next input number as radius.

System.

// out  //.print(  "What is the height of the cylinder in centimeters?"  );

** double  ** height = keyboard.nextDouble;  //Recognizes the next input number as height.

** double  ** volume = Math.//  PI  // * (radius * radius) * height;  //calculates the volume.

System.

// out  //.print(  "The volume of the cylinder is "  + volume +  " cubic centimeters."  );