diff --git a/Week-11-final-start/part-2/ShoppingCart.java b/Week-11-final-start/part-2/ShoppingCart.java index 213616a..9db2101 100644 --- a/Week-11-final-start/part-2/ShoppingCart.java +++ b/Week-11-final-start/part-2/ShoppingCart.java @@ -3,7 +3,7 @@ import java.util.ArrayList; public class ShoppingCart { private String customerName; private String currentDate; - private ArrayList cartItems; + private ArrayList cartItems; ShoppingCart (){ customerName = "none"; @@ -22,12 +22,21 @@ public class ShoppingCart { return currentDate; } + private void printNameDate (){ + System.out.println(customerName + " Shopping Cart - "+ currentDate); + } + public void addItem(ItemToPurchase item){ - //add item to cartItems + cartItems.add(item); } public void removeItem(String itemName){ - //if itemname not found print - //"Item not found in cart. Nothing removed." + for (int i=0; i