Decorator pattern and baking a pizza

I am a self proclaimed master chef. And I love baking pizza. I was going through a video and the presenter mentioned the process of baking pizza as an example of decorator pattern. I had some example PHP “pizza” code lying around and decided to use namespaces and composer to build upon it. Here is the Just an example of decorator pattern. I might push more code to GitHub.

Update: I have been trying to get hang of Java and I did this same example using Java. Actually it was pretty easy to translate this code to Java. I did find and replace all for most of the stuff. Here is the repo.

Leave a comment

Your email address will not be published. Required fields are marked *