package se1011_jones_class5_1_doWhileAndJavaApi;// Dr. Yoder. MSOE. 09 January 2017 public class PackageDesigner { public static void main(String[] args) { String choice; do { // TODO: Fix THIS!!!!!! System.out.println("Welcome to the package designer program.\n" + "This program allows you to specify the dimensions of\n " + "a canister and a box and tells you which is bigger."); System.out.println("Please type an option:\n" + "can - Enter the size of the can\n" + "box - Enter th size of the box\n" + "ball - ???\n" + "quit - Quit the program"); String can; String box; java.util.Scanner in = new java.util.Scanner(System.in); choice = in.next(); System.out.println("choice = " + choice); if (choice.equals("can")) { System.out.print("Please enter the radius of the can: "); double radius = in.nextDouble(); System.out.print("Please enter the height of the can: "); double height = in.nextDouble(); double volume = Math.PI * radius * radius * height; System.out.println("The volume of the can is "+volume); } else if (choice.equals("box")) { System.out.println("TODO: enter box"); } else if (choice.equals("ball")) { System.out.print("Please enter the radius of the ball: "); double radius = in.nextDouble(); double volume = 4.0/3.0 * Math.PI * Math.pow(radius,3); System.out.printf("The volume of the ball is " +volume); } else { System.out.println("TODO: Quit maybe?"); } } while(!choice.equals("quit")); } }