I wanted to apply the decorator design pattern for my cinema ticketing system. I noticed how different hall types (e.g. Regular, Luxe, Deluxe) had different prices. So, I made this simple decorator diagram.
I wanted to ask if I used the decorator pattern correctly in my case. If I want to add new hall types, I can just make a new class and use it right away.
Thank you for the help.
Aucun commentaire:
Enregistrer un commentaire