Bird
0
0

You want to design a system that applies multiple discounts: a 10% seasonal discount and a $15 coupon. Which approach correctly calculates the final price for an item priced at $200?

hard📝 Trade-off Q8 of 15
LLD - Design — Online Shopping Cart
You want to design a system that applies multiple discounts: a 10% seasonal discount and a $15 coupon. Which approach correctly calculates the final price for an item priced at $200?
ASubtract $15 coupon first, then apply 10% discount
BApply 10% discount first, then subtract $15 coupon
CAdd 10% discount and $15 coupon together, then subtract from price
DApply only the larger discount between 10% and $15
Step-by-Step Solution
Solution:
  1. Step 1: Understand discount order impact

    Applying percentage discount first reduces price, then fixed coupon subtracts from that.
  2. Step 2: Calculate final price stepwise

    200 * 0.9 = 180; 180 - 15 = 165 final price.
  3. Final Answer:

    Apply 10% discount first, then subtract $15 coupon -> Option B
  4. Quick Check:

    Percentage then fixed coupon = correct order [OK]
Quick Trick: Apply percentage discounts before fixed amount coupons [OK]
Common Mistakes:
  • Reversing discount order
  • Adding discounts incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes