Lld
Low-Level Design
Medium
E-Commerce Shopping Cart
Create a design for a shopping cart in an e-commerce application that can handle different types of products (e.g., digital goods, physical goods). Each product type should have specific attributes and methods. The shopping cart should calculate the total price, apply discounts, and manage inventory for physical goods. What classes will you define and how?
Key concepts
aggregationinterfacespolymorphism
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now