/** BalloonPrank.java reads a balloon’s radius from the keyboard,
 *   and displays the number of balloons needed to fill a bedroom.
 * ...
 */

import java.util.Scanner;

public class BalloonPrank {
	public static void main(String[] args) {
     // roommate’s bedroom dimensions (in feet)
     final double LENGTH = 9.0;
     final double WIDTH = 8.0;
     final double HEIGHT = 7.0;
     // get the balloon radius
     System.out.print("Enter a balloon radius (inches): ");
     Scanner kbd = new Scanner(System.in);
     double balloonRadius = kbd.nextDouble();
     balloonRadius /= 12.0;                   // convert to feet
     // compute the balloon volume
     double balloonVolume = Sphere.volume(balloonRadius);
     // compute bedroom volume (in inches)
     double bedroomVolume = Box.volume(LENGTH, WIDTH, HEIGHT);
     // compute balloons in bedroom
     double balloonsRequired = bedroomVolume / balloonVolume;
     System.out.printf("Using balloons of radius %.0f inches,"
    		           + " you will need %.0f balloons",
    		            balloonRadius*12, balloonsRequired);
 	}
}
