Index
All Classes and Interfaces|All Packages|Constant Field Values
C
- cart - Variable in class cs2110.GrocerySimulator
-
The shopping cart for the customer being simulated.
- Cart - Class in cs2110
-
A (mutable) collection of items that are in a shopper's grocery cart.
- Cart() - Constructor for class cs2110.Cart
-
Create a new empty cart.
- code - Variable in class cs2110.SingleItem
-
The UPC code for this item's product; must be positive.
- codes - Variable in class cs2110.Coupon
-
A non-empty array of item codes which must all be present (and undiscounted) in the cart for this coupon to be applied.
- contents - Variable in class cs2110.Cart
-
Array of length MAX_CAPACITY that contains the collection of items in the cart.
- contents() - Method in class cs2110.Cart
-
Return an array *copy* that contains the same items as this cart.
- cost - Variable in class cs2110.SingleItem
-
The cost of this item in cents; must be non-negative.
- cost() - Method in class cs2110.BulkItem
-
Return the cost of this item, in cents.
- cost() - Method in interface cs2110.Item
-
Return the cost of this Item, in cents.
- cost() - Method in class cs2110.SingleItem
-
Return the cost of this item, in cents.
- costAsString(int) - Static method in class cs2110.Utility
-
Return the string representation of the dollar amount corresponding to `cost` cents.
- Coupon - Class in cs2110
-
Represents an (immutable) coupon.
- Coupon(int, long[], int) - Constructor for class cs2110.Coupon
-
Create a coupon with ID `couponId` that makes its holder eligible for a discount of `discount` cents when distinct items with code `itemCodes` are checked out (and have not already been used by another coupon).
- coupons - Variable in class cs2110.GrocerySimulator
-
An array of coupons that are currently valid at the store.
- cs2110 - package cs2110
All Classes and Interfaces|All Packages|Constant Field Values