trz-maier / hwu-ase-group2

2 stars 2 forks source link

Add final report method #63

Closed trz-maier closed 5 years ago

trz-maier commented 5 years ago

Final report to be added in OrderController class (I assume). Please reassign if you have a different opinion. I will add a setter taking a String as a parameter, i.e. setFinalReport() in the OrderFrame to follow the similar setters already in place.

jathanasiou commented 5 years ago

~I think we could just make the controller's generateReport() return a String since the frame will be doing the request.~

Actually, I think the best approach would be to have a signature of

public void generateReport(String targetFilename)

so that the flow goes like this

  1. Frame displays file selector
  2. User picks file/filename
  3. GUI passes that to OrderController.generateReport and exits afterwards.

How does that sound? @trz-maier

trz-maier commented 5 years ago

@jathanasiou apologies I missed this thread. either way will be fine, you are probably right that the Controller should be able to write a report into a file without Frame intervention so what you are proposing is reasonable

jathanasiou commented 5 years ago

Missing a line break in the output, will be fixing with a further commit.