/** Bill McKenney * HTHS * Local facilitator: Mrs. Purves * Assignment number: J6 */ import java.io.*; class TireIn { public static void main (String[] args) throws IOException { InputStreamReader inStream = new InputStreamReader (System.in); BufferedReader stdin = new BufferedReader (inStream); String inData; // variable for input int ft1, ft2, bt1, bt2; System.out.println ("Input front left tire pressure."); // tells user to input a value inData = stdin.readLine ( ); // processes input ft1 = Integer.parseInt (inData); // changes char to integer System.out.println ("Input front right tire pressure."); // tells user to input a value inData = stdin.readLine ( ); // processes input ft2 = Integer.parseInt (inData); // changes char to integer System.out.println ("Input back left tire pressure."); // tells user to input a value inData = stdin.readLine ( ); // processes input bt1 = Integer.parseInt (inData); // changes char to integer System.out.println ("Input back right tire pressure."); // tells user to input a value inData = stdin.readLine ( ); // processes input bt2 = Integer.parseInt (inData); // changes char to integer if (ft1 >= 32 && ft1 <=38 && ft2 >= 32 && ft2 <=38 && bt1 >= 32 && bt1 <=38 && bt2 >= 32 && bt2 <=38) { System.out.println ("Tire inflation is within the specified range."); } else System.out.println ("Tire inflation isnt within the specified range."); if (ft1 != ft2) { System.out.println ("Tire inflation is not the same in the front tires."); } if (bt1 != bt2) { System.out.println ("Tire inflation is not the same in the back tires."); } if (ft1 >= 32 && ft1 <=38 && ft2 >= 32 && ft2 <=38 && bt1 >= 32 && bt1 <=38 && bt2 >= 32 && bt2 <=38 && ft1 != ft2 && bt1 != bt2) { System.out.println ("Tire inflation is OK!"); } } }