Code Implementation
Implement the complete Food Delivery System in Python and Java — enums, core entities, cart with single-restaurant constraint, State Pattern for order lifecycle, Observer for notifications, Strategy for delivery assignment, and a realistic end-to-end driver example.