I have to have the tire pressure of the two back wheels the same and the two back wheels the same but it doesnt seem to be working.
public class Pressure
{
private int fr;
private int fl;
private int br;
private int bl;
public Pressure()
{
}
public void getPressure()
{
if(fr == fl && br==bl)
System.out.println("Your tire pressure is ok.");
else
System.out.println("Your tire pressure is not ok.");
}
}
import java.util.Scanner;
public class PressureTester
{
public static void main(String[]args)
{
Scanner in = new Scanner(System.in);
System.out.println("Pressure of Front Right tire.");
int fr = in.nextInt();
System.out.println("Pressure of Front Left tire.");
int fl = in.nextInt();
System.out.println("Pressure of Back Right tire.");
int br = in.nextInt();
System.out.println("Pressure of Back Left tire.");
int bl = in.nextInt();
Pressure set1 = new Pressure();
System.out.println(set1.getPressure());
}
}