Theory ofIntelligence
← PRACTICE/
‹ Prev35 / 35Next ›
Hard
Python• OOP

E-commerce Platform Backend

Design a backend-like model with User (Customer, Admin), a Product hierarchy, Order, and PaymentGateway.

Apply composition for cart logic. Use a Factory to create orders, and ensure extensibility for new product categories or payment methods.

Handle edge cases like refunds and inventory.

OOP Focus: Full system design with OOP principles.

Note: This is statement-only in the current Practice version; stdout should be empty.

Sample Test Verification
1 Test Case
Statement & Architecture VerificationThis drill validates class blueprints, object attributes, and method state transitions without requiring console printing.
solution.py
Initializing Monaco Python Environment...
Input (stdin)
(empty string)
Expected Output (stdout)
(no output expected)