I want to create a java program which draws some shapes(Line, Triangle, Polygon) and has an image bmp as output. I have to implement that program with Singleton Pattern and Factory Pattern as design patterns. Can you help me to combine these two patterns? I have tried to make an instance static generator for Singleton but i need a constructor with parameters (for positions, dimensions) but i don't know how to use Singleton in this case. Thanks.
Aucun commentaire:
Enregistrer un commentaire