lundi 9 décembre 2019

How to use design pattern in following [closed]

I would like to offer discount to customer based on their bill . For e.g if customer is having bill of less than 10000 then no discount. If 10k to 20k then 10 % discount etc. Well this could be easily design with switch case or if else . But I want to use design pattern in Java . Also systems should be such that I can easily add or remove discount slab . If possible please attach code

Aucun commentaire:

Enregistrer un commentaire