package class1_2_References_start;// Dr. Yoder. MSOE. 04 March 2017 import java.util.Scanner; public class Menu { public static void main(String[] args) { Scanner in = new Scanner(System.in); String command = solicitCommand(in); while(command != "quit") { if(command == "sing") { System.out.println("Mary had a little lamb"); } else if(command == "dance") { System.out.println("Put your right foot in!"); } else { System.out.println("Unrecognized command: "+command); } command = solicitCommand(in); } } private static String solicitCommand(Scanner in) { System.out.println("Please enter an option:"); System.out.println(" sing - Sing a song"); System.out.println(" dance - Polka time"); System.out.println(" quit - exit the program"); return in.next(); } }