Print menu only once
This commit is contained in:
parent
7dfedb2f16
commit
af7220b0d5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user