Skip to content

sum-of-multiples: update starter implementation - #586

Merged
FridaTveit merged 1 commit into
masterfrom
545-fix
May 22, 2017
Merged

FridaTveit merged 1 commit into
masterfrom
545-fix

Conversation

@stkent

@stkent stkent commented May 21, 2017

Copy link
Copy Markdown
Contributor

Fixes #545.


Reviewer Resources:

Track Policies

int getSum() {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}

@chuckwondo chuckwondo May 21, 2017 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I suggest making the constructor and the method public. Although leaving them out won't cause problems for running the tests (since they are in the same default package), that's not generally how they would be written.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Tricky one. See #571 for some prior discussion. I tend to think of each exercise's tests + implementations as the entire system, and write code with that in mind. I'm not sure @exercism/java has reached a consensus on this yet, however.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fair enough. Thanks for the follow up.

@FridaTveit FridaTveit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, thanks @stkent! :)

@FridaTveit
FridaTveit merged commit da79275 into master May 22, 2017
@stkent
stkent deleted the 545-fix branch May 26, 2017 09:49
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.

3 participants