Question: Please review my code and help me run it successfully: package coffee; import java.util.Scanner; / * * * Program will help user decide what type
Please review my code and help me run it successfully:
package coffee;
import java.util.Scanner;
Program will help user decide what type of drink to order.
@author carmendeloach
public class Coffee
public static void mainString args
Scanner in new ScannerSystemin;
int choice innextInt;
String size size;
boolean cream;
cream innextBoolean;
System.out.print Please take a look at the drink choices";
Display menu
System.out.printlnCarmens Cafe Menu";
System.out.println;
System.out.println Americano";
System.out.println Espresso";
System.out.println Latte";
System.out.println Iced Coffee";
System.out.println;
System.out.printEnter menu number option";
Get choice from user
Check choice
System.out.printlnPlease enter your choice";
if choice
System.out.printlnAmericano coffee, great choice!";
System.out.printlnWould you like cream?";
I can't figure out where to put these arguments and the code actually runs
I tried putting it at line but that didn't work.
cream innextBoolean;
System.out.printlnThe boolean value entered cream;
else if choice
System.out.printlnEspresso Would you like a single or double?";
int shot innextInt;
else if choice
System.out.printlnLatte The only milk we have is Almond though.";
else if choice
System.out.printlnIced Coffee";
else if choice
System.out.printlnThat is not a menu option, try again";
System.out.printlnWhat size drink would you like?";
String size scanner.nextLine;
System.out.printlnDrink choice choice size of drink" size;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
