Giter Site home page Giter Site logo

tmanechouaib / decorator-pattern-pizza-app Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 835 KB

This repository showcases the implementation of the Decorator pattern in a java-based Pizza application :octocat:

Java 100.00%
decorator-pattern inversion-of-control open-closed-principle

decorator-pattern-pizza-app's Introduction

Decorator Pattern - Pizza App Demo

πŸ”Ž Table of Contents:

πŸ“Ž About:

  • πŸ‹οΈβ€β™‚οΈThis repository is an application demonstrating the implementation of the Decorator design pattern in Java. The Decorator pattern allows dynamic addition of new behavior to an object by wrapping it with one or more decorators.

πŸ“Ž Features:

  • Customization of pizzas with decorators.
  • Flexible and extensible design.
  • Stackable decorators for combining functionalities.
  • Reusability of decorators across various pizzas.
  • Separation of concerns for better code organization.

πŸ“Ž Class diagram:

πŸ“Ž Project Structure:

decorator-pattern-pizza-app/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ decorators/
β”‚   β”‚   β”œβ”€β”€ BellPepperDecorator.java
β”‚   β”‚   β”œβ”€β”€ CheeseDecorator.java
β”‚   β”‚   β”œβ”€β”€ MushroomDecorator.java
β”‚   β”‚   β”œβ”€β”€ OliveDecorator.java
β”‚   β”‚   β”œβ”€β”€ OnionDecorator.java
β”‚   β”‚   └── PizzaDecorator.java
β”‚   β”‚
β”‚   β”œβ”€β”€ pizzas/
β”‚   β”‚   β”œβ”€β”€ BasicPizza.java
β”‚   β”‚   β”œβ”€β”€ IPizza.java
β”‚   β”‚   └── MargaritaPizza.java
β”‚   β”‚
β”‚   └── Main.java
β”‚
└── README.md

πŸ“Ž Contacts:

  • For any inquires or feedback regarding this project, please contact me on: [email protected].

End


Author: Tmane Chouaib

decorator-pattern-pizza-app's People

Contributors

tmanechouaib avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.