mercredi 4 juillet 2018

Using factory design pattern in Java

I am hoping to use design patterns in my java project and for me factory pattern seems to be the most suitable since its less complex and I found a suitable scenario in my project to implement it.

In the scenario I have 3 classes which could be made to implement an interface. I learnt how to implement the factory pattern in java from the tutorialspoint

(https://www.tutorialspoint.com/design_pattern/factory_pattern.htm)

But the only problem limiting me is that the names of the methods are not the same as in the tutorial. Is there any way to apply the factory design pattern for this scenario?

Aucun commentaire:

Enregistrer un commentaire