From af7220b0d5bbbd635be5bbd2f2ec2b25e6e7796b Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Wed, 11 Nov 2020 14:40:49 -0500 Subject: [PATCH] Print menu only once --- .../part-2/ShoppingCartManager.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Week-11-final-start/part-2/ShoppingCartManager.java b/Week-11-final-start/part-2/ShoppingCartManager.java index 736560d..3e74448 100644 --- a/Week-11-final-start/part-2/ShoppingCartManager.java +++ b/Week-11-final-start/part-2/ShoppingCartManager.java @@ -23,14 +23,14 @@ public class ShoppingCartManager { char userInput; userInput = 0; + System.out.println("MENU\n"+ + "a - Add item to cart\n"+ + "d - Remove item from cart\n"+ + "c - Change item quantity\n"+ + "i - Output items' descriptions\n"+ + "o - Output shopping cart\n"+ + "q - Quit"); while (userInput != 'q'){ - System.out.println("MENU\n"+ - "a - Add item to cart\n"+ - "d - Remove item from cart\n"+ - "c - Change item quantity\n"+ - "i - Output items' descriptions\n"+ - "o - Output shopping cart\n"+ - "q - Quit"); userInput = scnr.next().charAt(0); scnr.nextLine(); switch (userInput) {