Exercise 3: A Second Customer's Redemption — Possible Solution ==================================================================== SETUP ------------------------------ Customer 1 (GOLD, from the chapter's own final integration check): 40 points balance, redeems all 40 Customer 2 (PLATINUM, new for this exercise): 25 points balance, redeems all 25 RESULTS ------------------------------ Customer 1 (GOLD, 40 pts redeemed): $4.00 Customer 2 (PLATINUM, 25 pts redeemed): $2.50 Customer 1 recheck (unaffected by Customer 2's own call): $4.00, matches original: True Customer 2 negative points correctly rejected: "cannot redeem a negative number of points" Expected: Customer 1 = $4.00, Customer 2 = $2.50 Match: True WHY THIS WORKS AS AN ANSWER ------------------------------ This confirms calculate_redemption_discount() - the single shared function Step 7's own code review required, replacing the two duplicated copies - genuinely has no hidden shared state between calls: Customer 1's own result stays exactly $4.00 whether checked before or after Customer 2's own independent redemption, and the negative-points rejection Step 3's standup blocker required works identically for a second, different customer without needing separate handling. This is the same guarantee Clean Code, SOLID & Refactoring's own capstone and Software Testing Strategy's own capstone both verified for their respective shared functions - a properly extracted, pure function processes each call independently, with no risk of one customer's own transaction leaking into another's.