Interview practice question
Designing a discount rules engine
Backend Engineering · OOP and Design Patterns · Experienced
Marketing wants to create complex promotions without code changes, like "20 percent off shoes for members, max one per order, until Sunday". How would you design it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Rules as data: conditions + actions.
- Specification objects for conditions.
- Action strategies (percentage, fixed, free item).
- Priority, stacking and exclusivity rules.
- Validation, simulation and audit.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.