Design an Extensible Shipping Cost Calculator
Design a deterministic quote calculator that explains charges across shipment, route, service, region, priority, and handling factors.
Design a shipping-cost calculator whose price varies by package weight, travel distance, delivery type, priority, region, and special handling.
For this exercise, assume a clerk requests one quote in a single currency, every factor is validated before pricing, and the result contains an immutable ordered adjustment breakdown plus a total.
Each quote uses one named, versioned pricing-policy snapshot, decimal money, and a deterministic rule order so the same request and policy produce the same total. Missing or incompatible factor inputs fail the quote; no partial quote is returned.
Exclude taxes, discounts, carrier selection or booking, shipment tracking, persistence, distributed scaling, and concurrent policy administration.
Design the responsibilities, public contracts, and calculation interaction so factor rules can evolve independently without embedding a branch for every factor in the calculator.