Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The decorartor pattern (read about it: https://en.wikipedia.org/wiki/Decorator_pattern)

This is an example of the decorator pattern where most stores use it to generate the bill.
Here we apply it in a Café wehere you have 1,2,3 & 4 main coffee types and have a,b,c & d condiments.
Like in my sample main, a customer has ordered a coffe of type A and added 2 condiments of types 1 & 3.
The output of the program is the bill. Where the last line is the total cost.

About

This repo will contain my work in some design patterns examples.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages