Package edu.uw.tcss.model


package edu.uw.tcss.model
Model classes for the UW Bookstore application.

This package contains the domain model for a bookstore shopping cart system:

  • Item - Sealed interface for all purchasable items
  • StoreItem - Simple item with standard pricing
  • StoreBulkItem - Item with bulk pricing for members
  • ItemOrder - Immutable record pairing an item with quantity
  • Cart - Interface for shopping cart operations
  • StoreCart - Shopping cart implementation

Class Hierarchy

Item (sealed interface)
├── StoreItem (final) — Simple pricing
└── StoreBulkItem (final) — Bulk pricing for members

Cart (interface)
└── StoreCart (final) — Shopping cart implementation

ItemOrder (record) — Item + quantity pair
Version:
Winter 2026
Author:
Charles Bryan
  • Class
    Description
    Represents a shopping cart that holds item orders.
    A record representing the size of a shopping cart.
    Represents a single item for sale in the bookstore.
    Represents a purchase order for an item - an immutable pairing of an Item with a desired quantity.
    Represents an item with bulk pricing available for members.
    Implementation of a shopping cart for the bookstore.
    Represents a simple item with standard pricing (no bulk discounts).