/** 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;

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 inches to feet
    // build balloon and bedroom models
    Sphere balloon = new Sphere(balloonRadius);
    Box bedroom = new Box(LENGTH, WIDTH, HEIGHT);
    // compute balloons in bedroom
    double balloonsRequired = bedroom.volume() / balloon.volume();
    System.out.printf("Using balloons of radius %.0f inches,"
  		                 + " you will need %.0f balloons",
   		                 balloonRadius*12, balloonsRequired);
  }
}
