vendredi 4 décembre 2020

Is there a design pattern for the discount model

Are there any known design patterns for implementing discount models?

By discount models, I mean the following:

  1. If a customer buys Product X, Product Y and Product Z, they will get 5% off
  2. If a customer buys Product more than 500Rs, they will get 10% off

Is there a general pattern that can be implemented to handle all of the above scenarios?

Aucun commentaire:

Enregistrer un commentaire