Skip to content

Added stubs to LargestSeriesProductCalculator - #869

Merged
FridaTveit merged 1 commit into
exercism:masterfrom
delbertlegg:549_Create_largest-series-product
Oct 6, 2017
Merged

FridaTveit merged 1 commit into
exercism:masterfrom
delbertlegg:549_Create_largest-series-product

Conversation

@delbertlegg

Copy link
Copy Markdown
Contributor

Fixes #549


Reviewer Resources:

Track Policies

@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.

This looks great @delbertlegg! Thanks for tackling this :)

I've left a couple of comments, but they're all minor things. Let me know if you have any questions and feel free to disagree with any of my comments :)

public class LargestSeriesProductCalculator {
public LargestSeriesProductCalculator(String inputNumber) {
throw new UnsupportedOperationException
("Delete this statement and write your own implementation.");

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.

This should all be on one line :)

@@ -1,5 +1,11 @@
public class LargestSeriesProductCalculator {

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.

Both the class and the methods can be made package private. The class's access modifier was there from before so that's not at all your fault :) But it would be a nice improvement to make while we're modifying the class. It's generally best practice to be as restrictive as possible with access modifiers :)




public long calculateLargestProductForSeriesLength(long numberOfDigits) {

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.

numberOfDigits should be an int :)

@delbertlegg
delbertlegg force-pushed the 549_Create_largest-series-product branch 2 times, most recently from 9fb8d0c to 0f87d89 Compare October 6, 2017 14:22
@delbertlegg

Copy link
Copy Markdown
Contributor Author

Issues with rebase...sorry. Will clean up.

Make changes per review comments

Made class and methods package private
@delbertlegg
delbertlegg force-pushed the 549_Create_largest-series-product branch from 0f87d89 to 38b75f7 Compare October 6, 2017 14:29

@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.

This looks great! Thanks for taking the time to do this @delbertlegg! :)

@FridaTveit

Copy link
Copy Markdown
Contributor

Will merge as soon as the build finishes :)

@delbertlegg

Copy link
Copy Markdown
Contributor Author

@FridaTveit No problem! Found this via Hacktoberfest and is a really cool project. Would like to contribute more substantially in the future if there's an opportunity.

@FridaTveit

Copy link
Copy Markdown
Contributor

That's great! We always need people to help contribute so feel free to do any more issues or do any other contribution that you feel like :) And of course if you have any questions then just ask :)

@FridaTveit
FridaTveit merged commit 74f6f46 into exercism:master Oct 6, 2017
@delbertlegg
delbertlegg deleted the 549_Create_largest-series-product branch October 9, 2017 12:33
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