Lets say I have a Shape interface which calculates the area of shape. I add 2 implementations Circle and Square. The challenge I see is both implementations have their own multiple argument constructors. How do I initialize them using a factory pattern. I wanted to solve it using java.
Aucun commentaire:
Enregistrer un commentaire