Exercise 1: Re-Running the Capstone With a Well-Stocked, Non-Loyalty Order — Possible Solution ==================================================================== THE CHANGE ------------------------------ Only the input data changed - stock_data = {'PROD-1': 50} instead of 5, and is_loyalty_member=False for both the quote and the actual order. Every class (PricingEngine, OrderRepository, EventBus, OrderService, the adapters) is completely unchanged from this chapter's own capstone code. VERIFYING THE QUOTED PRICE STILL MATCHES THE ACTUAL PRICE ------------------------------ quoted price: 100 actual price: 100 match: True manual check: no scarcity (stock=50>=10), no loyalty -> 100.0 With stock at 50 (well above the <10 scarcity threshold) and no loyalty discount, neither of PricingEngine's own two conditional branches fires - the price stays exactly at the base_price of 100, and both the quote and the actual order agree, exactly as this chapter's own low-stock scenario did. VERIFYING NO LOW-STOCK NOTIFICATION FIRES ------------------------------ notifications sent (should be empty): [] Confirmed empty - with stock at 50, PricingEngine's own `if stock < 10:` branch is never entered, so notification_adapter.notify_low_stock() is never called at all. WHY THIS CONFIRMS THE SHARED-CORE GUARANTEE HOLDS ACROSS SCENARIOS ------------------------------ This chapter's own original scenario tested the "low stock, loyalty member" case. This exercise tests the opposite corner (well-stocked, non-loyalty) and gets the identical guarantee: quote equals actual charge, because both calls still go through the one shared PricingEngine instance. The guarantee isn't specific to the scarcity- pricing branch - it holds for whichever combination of business rules actually fires, because the SAME logic runs both times regardless of which branches are active. WHY THIS WORKS AS AN ANSWER ------------------------------ The scenario is re-run with only the input data changed, keeping every class from this chapter's own capstone unmodified, and both the price match and the absence of a low-stock notification are verified directly rather than assumed to follow from the first scenario's own result.