-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestaurantSelector.java
More file actions
24 lines (21 loc) · 933 Bytes
/
Copy pathRestaurantSelector.java
File metadata and controls
24 lines (21 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package Week3;
import java.util.Scanner;
public class RestaurantSelector {
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
System.out.println("Is anyone vegetarian?");
String vegetarian = console.nextLine();
System.out.println("Is anyone vegan?");
String vegan = console.nextLine();
System.out.println("Is anyone gluten free?");
String gluten = console.nextLine();
if (vegetarian.equals("no") && vegan.equals("no") && gluten.equals("no")){
System.out.println("Joe’s Gourmet Burgers");
}else if (vegan.equals("no")){
System.out.println("Main Street Pizza Company");
} else if (gluten.equals("no")&& vegan.equals("no")) {
System.out.println("Mama’s Fine Italian");
}
System.out.printf("Corner Café%nThe Chef’s Kitchen ");
}
}