Index
All Classes and Interfaces|All Packages|Constant Field Values
S
- savings - Variable in class cs2110.RegisterTransaction
-
The total amount (in cents) saved by the scanned coupons.
- savings() - Method in class cs2110.RegisterTransaction
-
Return the total amount of coupon discounts currently applied (in cents).
- scanCoupon(Coupon) - Method in class cs2110.RegisterTransaction
-
Attempt to apply `coupon` to this transaction and return whether it was successfully applied.
- scanned - Variable in class cs2110.GrocerySimulator
-
An array that tracks which coupons have been scanned (either successfully or unsuccessfully) during the simulation.
- shelve(Item) - Method in class cs2110.Store
-
Inserts this item into the store's inventory.
- SingleItem - Class in cs2110
-
Represents grocery store items that are priced and purchased by unit, such as a box of pasta, a can of soup, etc.
- SingleItem(long, String, int) - Constructor for class cs2110.SingleItem
-
Create an Item representing one unit of the product with UPC code `code` and name `name`, which costs `cost` cents.
- size - Variable in class cs2110.Cart
-
The number of items in this cart.
- size() - Method in class cs2110.Cart
-
Return the number of items currently stored in this cart.
- sortReceiptItems(String) - Static method in class cs2110.GrocerySimulator
-
Rearranges the items on the receipt into alphabetical order.
- store - Variable in class cs2110.GrocerySimulator
-
The inventory of the grocery store being simulated.
- Store - Class in cs2110
-
A mutable data structure that represents the current inventory of a grocery store.
- Store() - Constructor for class cs2110.Store
-
A basic constructor that initializes the inventory to be empty.
- Store(Scanner) - Constructor for class cs2110.Store
-
A constructor that initializes the inventory of the store based on the lines of a simulation file.
- subtotal - Variable in class cs2110.RegisterTransaction
-
The total cost (in cents) of all items being purchased in the transaction, before deductions.
- subtotal() - Method in class cs2110.RegisterTransaction
-
Return the total cost (in cents) of all items being checked out, before discounts are applied.
All Classes and Interfaces|All Packages|Constant Field Values