BUILD-YOUR-PIZZA 🍕
• A Modular Approach Using Decorator Pattern
• Team: T Sai Gnanusha | Saranya K | Gagana
Sindhu
• Guide: Dr. Balaji E
• Course: SWE2024 - Software Reuse
• Semester: Fall 2025–2026
Motivation for Choosing the
Project
• • Everyone loves pizza – simple and relatable
example!
• • Easy to explain how design patterns work.
• • Helps understand real-world customization
and modular design.
Project Domain
• • Domain: Food & Beverage / Restaurant
Management
• • Focus: Customizable food ordering system
• • Goal: Show how software design patterns
improve flexibility & reusability.
Main Objective
• To create a pizza customization system that
demonstrates modular design and easy
scalability using multiple software design
patterns.
Design Patterns Used
• 11️⃣Decorator Pattern – add toppings
dynamically
• 2️⃣Factory Pattern – manage pizza creation
• 3️⃣Builder Pattern – build complex pizzas step-
by-step
• 4️⃣Singleton Pattern – maintain global
consistency
1 Decorator Pattern
1️⃣
• 👉 Used to add toppings dynamically without
changing the base pizza.
• Example:
• Plain Pizza + Cheese + Jalapenos
• = ‘Plain Pizza, Cheese, Jalapenos’
• Benefit: Flexible & reusable code structure.
2️⃣Factory Pattern
• 👉 Used for creating different pizza types (Veg /
Non-Veg).
• Why used:
• • Avoids repetitive object creation
• • Centralizes pizza creation process
• Benefit: Clean, scalable code.
3️⃣Builder Pattern
• 👉 Used to construct pizzas in steps.
• Example:
• Base → Crust → Sauce → Multiple Toppings
• Benefit: Makes the pizza-building process easy
and modular.
4️⃣Singleton Pattern
• 👉 Used for managing global data (like pricing,
topping list).
• Why used:
• • Ensures single instance of manager
• • Avoids inconsistency in data
• Benefit: Efficient and synchronized access.
How They Work Together
• Each pattern handles a different need:
• • Decorator → Adds toppings
• • Factory → Creates pizzas
• • Builder → Assembles pizzas
• • Singleton → Manages shared resources
System Implementation
• Developed in Java using OOP concepts.
• User can choose:
• 1️⃣Pizza Type – Veg / Non-Veg
• 2️⃣Toppings – Cheese, Olives, Jalapenos, etc.
• Then system calculates description & total
cost automatically.
Code Snapshot (Simplified)
• Example:
• Pizza pizza = new VegPizza();
• pizza = new Cheese(new Jalapenos(pizza));
• [Link]([Link]());
• [Link]([Link]());
Output Example
• ✅ Input:
• Veg Pizza + Jalapenos + Cheese
• 💡 Output:
• Description: Plain Pizza, Jalapenos, Cheese
• Cost: Rs.190
• Shows working of dynamic decorators!
Result Analysis
• ✔ Successfully implemented pizza
customization using multiple patterns.
• ✔ Each pattern worked together for
modularity & scalability.
• ✔ Demonstrates real-world use of design
patterns in a fun way!
Advantages of the Approach
• • Highly reusable and maintainable
• • Flexible for future changes
• • Reduces complexity and duplication
• • Improves user customization experience
Future Enhancements
• 🔹 Add GUI-based interface for pizza ordering
• 🔹 Include discount and combo logic
• 🔹 Connect to real-time restaurant
management system
Conclusion
• The project shows how multiple design
patterns together can make software flexible,
modular, and reusable — all through a fun
pizza example! 🍕
Thank You 🙏
• Questions?
• Presented by:
• Saranya K | T Sai Gnanusha | Gagana Sindhu