Getting errors and having a hard time seeing where. If I get it to build it is ignoring the inputmenu.
package personalprogram;
import java.util.Scanner;
/**
*
* @author mitch
*/
public class PersonalProgram {
/**
*/
public final class InputMenu
{
public void display_menu()
{
System.out.println("1) Calculate Cubic feet per hour of room:\n2) Calculate needed CFM of \n3) Option 3");
System.out.print("Selection: ");
}
public void question()
{
System.out.println("Would you like to proceed or quit?");
System.out.println("To proceed enter 3.");
System.out.println("If you wish to quit enter 0.");
Scanner q = new Scanner(System.in);
switch (q.nextInt())
{
case 0:
System.out.println ("Thank you and godbye.");
break;
case 3:
System.out.println ("Please proceed.");
new InputMenu();
break;
default:
System.err.println ( "Unrecognized option" );
break;
}
}
public InputMenu()
{
Scanner in = new Scanner(System.in);
display_menu();
switch (in.nextInt())
{
case 1:
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the length of the Clean Room:");
double length = scanner.nextDouble();
System.out.println("Enter the width of Clean Room:");
double width = scanner.nextDouble();
System.out.println("Enter the Ceiling hight of Clean Room:");
double hight = scanner.nextDouble();
//Area = length*width;
double area = length*width*hight;
System.out.println("Cubic foot of the Cleanroom is:"+area);
System.out.println("Enter the total CFM readings taken:");
double cfm = scanner.nextDouble();
double cfmh = cfm*60;
//Area = length*width;
double tac = cfmh/area;
System.out.println("Total Aire changes a hour in room is:"+tac);
break;
case 2:
System.out.println ( "You picked option 2" );
question();
break;
default:
System.err.println ( "Unrecognized option" );
break;
}
}
public static void main (String[]args)
{
new InputMenu();
}
}
}