subject

//TO DO: Import the Scanner class class Main {
public static void main(String[] args) {
//TO DO: Build a Scanner object

//PROBLEM 3: Based on a user's selection from the menu below, print a message telling them what sort of meal they will receive.
System. out. println("Do you have any of the following dietary restrictions: ");
System. out. println("1.Vegetarian");
//If the user is vegetarian, display this message: "You'll be receiving a vegetarian dish."
System. out. println("2.Vegan");
//If the user is vegan, display this message: "You'll be receiving a vegan dish."
System. out. println("3.Food Allergies");
//If the user has food allergies, display this message: "Please email us your specific needs so we can create a dish just for you!"
System. out. println("4.No restrictions");
//If the user has no restrictions, display this message: "Thank you!"

System. out. println("Please enter your selection: ");
int selection = myScanner. nextInt();

//YOUR CODE GOES HERE:

//TO DO: Close the Scanner

}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:20
[a] create a class called “cycle” which has two instance integer variables as properties, “numberofwheels” and “weight.” create a constructor with two parameters, using the same variable names in the parameter list. assign each variable to numberofwheels” and “weight” respectively. write a separate application to test the class and display its properties. note: do not change the names of the instance variables or the variables listed in the constructor’s parameter list. [b] edit your class cycle by adding a default constructor which will assign the default values of 100 to represent the numberofwheels, and 1000 to represent the weight, by invoking a call to the other constructor. modify your application created in [a] to test the class.
Answers: 3
question
Computers and Technology, 23.06.2019 01:10
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
You know the right answer?
//TO DO: Import the Scanner class class Main {
public static void main(String[] args) {
...
Questions