Suppose I am registering some data with the class "Job". (A list of business objects with various properties, for what it's worth.)
I want to be able to print this data, so I wonder if there is a more preferable design for this. At the moment, I have two ideas: calling the Print () method in the job itself or passing the job instance to some print controller class, for example:
job.Print();
or
PrintWidget pw = new PrintWidget(job);
pw.Print();
At the moment, I cannot plan to print anything other than data from this Job class. However, who knows what awaits in the future. With that in mind, would it be better to have separate Print () methods for any classes that I would like to print, or one print controller class that can handle different types of things to print?
How would you do that? Thanks in advance for any answers.
source
share