🚀 Your Mission
Design a complete system architecture using ALL FOUR design patterns working together!
This is deeper than Breakout 1 - you're not just identifying patterns, you're designing how they INTEGRATE into a cohesive system.
⭐ Integration Challenge - All 4 Patterns!
📱 The Scenario: QuickEats Food Delivery App
You are the software architect for "QuickEats" - a food delivery platform competing with DoorDash and UberEats. Your job is to design the system architecture that makes this app work smoothly.
🏪 Multiple Restaurant Types
Fast food, Fine dining, Food trucks, Cloud kitchens - each with different menus and behaviors
🚗 Different Delivery Methods
Standard (45min), Express (20min), Scheduled (pick time), Contactless
🔔 Real-Time Notifications
Order placed → Preparing → Driver assigned → On the way → Delivered
👤 Shared User Session
Cart, preferences, and location must sync across phone, web, and tablet
📦 What You'll Create
Draw a visual map showing where each pattern fits and how they connect
Answer questions about how patterns work together and handle real scenarios
Present your architecture to the class and explain design decisions
Part 1: Identify Pattern Roles (2 minutes - Individual Thinking)
Before designing together, individually check the boxes for what each pattern handles in this system:
Factory Pattern
Creates WHAT in QuickEats?
Strategy Pattern
Switches WHAT in QuickEats?
Observer Pattern
Notifies WHO in QuickEats?
Singleton Pattern
ONE instance of WHAT?
Part 2: Design System Architecture (7 minutes - Group Work)
Draw your QuickEats system architecture in the space below. Show:
- 📦 Boxes for each major component (Factory, Strategy, Observer, Singleton)
- ➡️ Arrows showing how components connect and interact
- 📝 Labels explaining what each pattern does
- 🔄 Data/event flow through the system
Example structure to get you started:
┌─────────────────────┐
│ 🏭 Factory │ Creates: FastFood, FineDining, FoodTruck restaurants
│ RestaurantFactory │
└──────────┬──────────┘
↓
[User selects Pizza Palace]
↓
┌─────────────────────┐
│ ⭐ Singleton │ ONE cart for entire session
│ ShoppingCart │ Syncs across all devices
└──────────┬──────────┘
↓
[User checks out]
↓
┌─────────────────────┐
│ 🔄 Strategy │ Calculates delivery cost/time
│ DeliveryStrategy │ Standard? Express? Scheduled?
└──────────┬──────────┘
↓
[Order placed!]
↓
┌─────────────────────┐
│ 📢 Observer │ Notifies:
│ OrderObserver │ • User's phone 📱
│ │ • Restaurant 🏪
│ │ • Driver 🚗
└─────────────────────┘
Draw your own architecture here! Use the space above, on paper, or on a whiteboard.
Make it visual - boxes, arrows, labels. Be creative!
💡 Design Tips
- Think about connections: How does Factory output connect to Singleton cart?
- Show the flow: What happens when user clicks "Order Now"?
- Label everything: Don't just draw boxes - explain what they do!
- Keep it clear: Simple and understandable beats complex and confusing
Part 3: Scenario Walkthroughs (5 minutes - Group Discussion)
Trace these real-world scenarios through your architecture. Which patterns handle each step?
🍕 Scenario A: User Orders Pizza
✅ Scenario B: Restaurant Confirms Order
When Pizza Palace marks order as "Preparing":
1. Who needs to be notified? List all parties:
2. Which pattern handles these notifications? How does it work?
📱 Scenario C: User Switches Devices
- User adds 3 items to cart on phone
- Opens QuickEats app on tablet
- Sees the same 3 items in cart
- Changes delivery address
Which pattern ensures cart syncs across devices? Explain WHY this pattern is needed:
Part 4: Pattern Interaction Questions (3 minutes - Critical Thinking)
Answer these questions to demonstrate deep understanding of how patterns work TOGETHER:
1. CONNECTION QUESTION:
The Factory creates a "FoodTruck" restaurant. The user orders. The Observer notifies the driver. How does the Observer know WHICH driver to notify? (Hint: What other components must be involved?)
2. INTEGRATION QUESTION:
If we REMOVED the Singleton pattern from QuickEats, what would break? Give 2 specific problems that would occur:
Problem 1:
Problem 2:
3. DESIGN DECISION QUESTION:
Could we use the Strategy pattern instead of the Factory pattern for creating restaurants? Why or why not? What's the fundamental difference?
4. REAL-WORLD EXTENSION QUESTION:
QuickEats wants to add a new delivery method called "Drone Delivery" that's faster but more expensive. Which pattern handles this? Would any OTHER patterns need to change? Why?
🎤 Presentation Guide (3 minutes total)
Each group will present to the class. Prepare to share:
Your 3-Minute Presentation Should Cover:
- 📊 Show your architecture diagram (1 minute)
- Point out where each of the 4 patterns fits
- Explain how they connect
- 🎬 Walk through ONE scenario (1 minute)
- Pick Scenario A, B, or C
- Trace the flow through your system
- 💭 Answer this question: (1 minute)
- "What was the hardest design decision your group made?"
- OR "What surprised you about how patterns interact?"
Presentation Tips:
- Speak clearly and confidently
- Everyone in the group should speak
- Use your diagram - point to things!
- Explain WHY you made design choices
✅ Success Criteria
You've successfully completed this exercise if you can:
✓ Place all 4 patterns correctly in your system
✓ Explain HOW patterns interact (not just WHERE they are)
✓ Trace real scenarios through your architecture
✓ Justify your design decisions with reasoning
Remember: This isn't about perfect code - it's about understanding how patterns work TOGETHER!
Think like an architect, not a coder. Design the structure, explain the connections! 🏗️