Design
Cafeteria Self-Checkout Billing System
Design a self-checkout billing system for a cafeteria that scans items, applies discounts, and generates a bill.
01 - Why interviewers ask this
Billing/discount problems are popular because the Strategy pattern makes such a visible difference — interviewers want to see discounts and payment methods as swappable strategies, not nested if/else.
02 - Where this system exists in the real world
You interact with this design every day.
Retail and cafeteria POS systems
Self-checkout kiosks
E-commerce cart pricing engines
03 - What you'll master
Solve this once. Know it forever.
Apply Strategy pattern to discounts and payments
Compose multiple discounts in a defined order
Generate accurate itemized bills with tax
04 - What you'll design
6 functional · 2 non-functional requirements.
Scan/add items to a cart with quantity
5 more requirements inside
Sign in to unlock the full brief and start designing
05 - Companies that ask this
You may face this exact question in your next interview.
Ready?
Open the canvas.
Design it yourself.
See all requirements, use staged hints, run your code, and compare with community discussions - all on the same canvas.
Start Solving