Skip to content

Conversation

@adityacosmos24
Copy link
Contributor

@adityacosmos24 adityacosmos24 commented Oct 26, 2025

Add a Food Delivery System using C++ and OOP Design Patterns


image

✅ Summary

This PR implements the complete Food Delivery System in C++ following Object-Oriented Design Principles and key Design PatternsSingleton, Factory, and Strategy.
The system simulates a simplified food ordering platform similar to Zomato, where users can browse restaurants, select items, place orders (delivery or pickup), and pay using multiple payment methods.


🧩 Key Features Implemented

📦 Models

  • User, Restaurant, MenuItem, Cart, Order, PickupOrder, DeliveryOrder

🏢 Managers (Singletons)

  • RestaurantManager – handles restaurant data and menus
  • OrderManager – manages active and past orders

🏭 Factories (Factory Pattern)

  • OrderFactory (abstract interface)
  • NowOrderFactory and ScheduledOrderFactory for creating order types dynamically

💳 Payment Strategies (Strategy Pattern)

  • PaymentStrategy (interface)
  • Implementations: CreditCardPaymentStrategy, UpiPaymentStrategy, NetbankingPaymentStrategy

🛎️ Services

  • NotificationService for sending notifications after order placement

🧰 Utils

  • TimeUtils for timestamps and order scheduling

🧠 Design Highlights

  • Demonstrates SOLID principles and design pattern usage for modularity and scalability.

  • Clean folder structure aligning with UML design:

    Food_Delivery_System/
    ├── models/
    ├── managers/
    ├── factories/
    ├── strategies/
    ├── services/
    └── utils/
    
  • Code documented with comments explaining relationships and responsibilities.


🧪 Testing

  • Verified all modules interact correctly through a main driver file.
  • Tested order creation (pickup and delivery), cart management, and all payment strategies.

📸 Attachments

  • UML Diagram (for reference)
  • Example Console Output Screenshot

📜 Additional Notes

  • Code written in C++17.
  • Follows consistent naming conventions and modular structure.

Requesting Review
Please review the code structure, design implementation, and adherence to OOP principles.
Feedback on design extensibility and naming conventions is welcome.

@prajwal3114 prajwal3114 merged commit 0d988f2 into OPCODE-Open-Spring-Fest:main Oct 28, 2025
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants