lundi 27 mars 2017

Does Chain of Responsibility work here?

I am designing a solution to a problem where I have list of items which have a score. For eg.

Product    Score
   A       10.4
   B       7.4
   Z       5.4
   D       4.4
   C       4.2
   H       4.1
   G       3.4
   BN      32.41
   CV      2.3
   AV      1.6
   FG      10.7
   .
   .
   .
   .
   ........

These items has to go through set of black box kinda steps..

scored item ----> Step 1 -- (re rank)---> Step 2 --(re rank)----> Step 3 -(re rank)---> Final Result

Each Step will rerank the some products based on their type. For eg. Step 1 will make sure Electronic products land in the top 10 score (it will make top 3 of electronic product fixed in top 10) when step 2 get this list it has to rerank but shouldn't re arrange the products fixed by step 1 but it should consider it while ranking others. I am thinking Chain of Responsibility design pattern. What do u guys think ?

Aucun commentaire:

Enregistrer un commentaire