import java.util.HashMap;

public class Cart {
	HashMap<String, Integer> cart = new HashMap<String, Integer>();

	public void addToCart(String id, int quantity) {
		int oldQuantity = 0;
		if (cart.containsKey(id))
			oldQuantity = cart.get(id);
		cart.put(id, oldQuantity + quantity);
	}

	public void removeFromCart(String id) {
		if (cart.containsKey(id))
			cart.remove(id);
	}


}