34 lines
708 B
Java
34 lines
708 B
Java
|
import java.util.Scanner;
|
||
|
|
||
|
public class ShoppingCartManager {
|
||
|
public static void main(String[] args) {
|
||
|
|
||
|
//Ask for customer name and today's date
|
||
|
//Output the name and date
|
||
|
//Create a shoppingCart
|
||
|
//
|
||
|
//Implement printMenu(ShoppingCart cart) method
|
||
|
//
|
||
|
Scanner scnr = new Scanner(System.in);
|
||
|
}
|
||
|
|
||
|
public void printMenu(ShoppingCart cart, Scanner scnr){
|
||
|
|
||
|
char userInput;
|
||
|
userInput = 0;
|
||
|
|
||
|
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);
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|