I am trying to fix this program, and no matter what I do, it prints every single response even if the conditions are not met. I feel like I took a long way around. Help would be great
import java.util.Scanner;
public class NoahJetRoberts_Project_2{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
System.out.println("Hello! this programe will help you decide where your party can eat!");
System.out.println("Is anyone here a vegan? (yes or no)");
String vegan = in.nextLine();
System.out.println("Okay, does anyone need gluten-free food?(yes or no)");
String GF = in.nextLine();
System.out.println("Is anyone a vegetarian?(yes or no)");
String vege = in.nextLine();
if (vegan.equals("yes") && GF.equals("yes") && vege.equals("yes"));
{
System.out.println("Okay, you can go to The Chef’s Kitchen and Corner Café");
}
if (vegan.equals("no") && GF.equals("no") && vege.equals("no"));
{
System.out.println("Okay, you can go anywhere");
}
if (vegan.equals("yes") && GF.equals("no") && vege.equals("no"));
{
System.out.println("Okay, you can go to The Chef’s Kitchen and Corner Café");
}
if (vegan.equals("no") && GF.equals("yes") && vege.equals("no"));
{
System.out.println("Okay, you can go to The Main Street Pizza Company and Corner Café and The Chef’s Kitchen");
}
if (vegan.equals("no") && GF.equals("no") && vege.equals("yes"));
{
System.out.println("You can go to The Chef’s Kitchen, Mama’s Fine Italian, Corner Café, Main Street Pizza Company");
}
if (vegan.equals("yes") && GF.equals("yes") && vege.equals("no"));
{
System.out.println("Okay, you can go to The Chef’s Kitchen and Corner Café");
}
if (vegan.equals("yes") && GF.equals("no") && vege.equals("yes"));
{
System.out.println("Okay, you can go to The Chef’s Kitchen and Corner Café");
}
if (vegan.equals("no") && GF.equals("yes") && vege.equals("yes"));
{
System.out.println("Okay, you can go to The Chef’s Kitchen, Corner Café, Main Street Pizza Company");
}
System.out.println("Thank you! Have a great time!");
}
}