vendredi 24 mars 2017

which is the best approch for below scenario [on hold]

In an interview I have asked, there is a service which returns different types error codes for different type of error. Say for example if error code is 1, that means client is inactive and it will be different for error codes 2,3,4 and so on. If return code is 1, then you have to activate the client so on for different type of codes you have to perform different operation. How will you design your logic other than using just switch? Is there any design pattern that helps solving these kind of problems?

Aucun commentaire:

Enregistrer un commentaire