Design a shopping cart and checkout system. Include cart management, pricing rules, coupon application, inventory reservation during checkout, order creation, and payment processing.
Suggested time: 45 minutes
Loading the workspace...
An e-commerce cart and checkout system is a rich OOD problem because it combines pricing strategy composition, transactional state management (inventory reservation with rollback), and a state machine for order lifecycle. Before writing classes, let's define what the system must do.
Cart Operations
Coupons and Discount Rules
Checkout Process
Order Lifecycle Tracking
Design an Object Pool (hard)
Design a Spreadsheet (hard)