dimanche 18 septembre 2022

Where to write the common logic in Java Strategy design pattern?

This is related to Java Strategy design pattern.

In Strategy pattern, we create objects which represent various strategies and a context object whose behavior varies as per its strategy object.

I have common code logic to be executed for all the strategies which is have implemented using Java Strategy design pattern. Which is the right place to write this common logics(something like validations and other stuffs).

Aucun commentaire:

Enregistrer un commentaire