Print menu only once

This commit is contained in:
Logen Kain 2020-11-11 14:40:49 -05:00
parent 7dfedb2f16
commit af7220b0d5

View File

@ -23,7 +23,6 @@ public class ShoppingCartManager {
char userInput;
userInput = 0;
while (userInput != 'q'){
System.out.println("MENU\n"+
"a - Add item to cart\n"+
"d - Remove item from cart\n"+
@ -31,6 +30,7 @@ public class ShoppingCartManager {
"i - Output items' descriptions\n"+
"o - Output shopping cart\n"+
"q - Quit");
while (userInput != 'q'){
userInput = scnr.next().charAt(0);
scnr.nextLine();
switch (userInput) {