I have a Printer class that should print a number and text. The number never changes for each Client class. I have more Client objects with different number values.
What design is better?
In the sample1 the number sends to print() method as argument, therefore all Client objects use single Print object. In the sample2 the number sends to the Printer constructor, therefore each Client object have own Printer object.
Please help me figure it out.

Aucun commentaire:
Enregistrer un commentaire