Skip to content

Refactor lesson2 - #5

Open
sergioOzzon wants to merge 3 commits into
DwarfPorter:masterfrom
sergioOzzon:RefactorLesson2
Open

Refactor lesson2#5
sergioOzzon wants to merge 3 commits into
DwarfPorter:masterfrom
sergioOzzon:RefactorLesson2

Conversation

@sergioOzzon

Copy link
Copy Markdown

No description provided.

Report report = new Report(new DisplayReport);
report.calculate();
report.output();
report.setSendReport(new PrintReport());

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше сделать наоборот, передать report в PrintReport. Так код будет проще.

Suggested change
report.setSendReport(new PrintReport());
report.setSendReport(new PrintReport());
SendOutput reportOutput = new PrintReport();
reportOutput.output(report)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants