-
-
Notifications
You must be signed in to change notification settings - Fork 708
armstrong-numbers: add to track #1073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @sjwarner-bp! I've made a couple of small comments but it's pretty much ready to merge :)
Sorry it took so long to review! I completely missed that it was ready for review! Will try to be quicker next time :)
int input = 5; | ||
boolean expected = true; | ||
|
||
assertEquals(expected, armstrongNumbers.isArmstrongNumber(input)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use assertTrue
and assertFalse
instead of assertEquals
for these tests :)
"integers", | ||
"mathematics" | ||
], | ||
"unlocked_by": null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be unlocked by some other exercise? Or do you think it should be always accessible? I think either is fine :)
Don't worry about it @FridaTveit, I have been a little busy too! 🙂 I'll get on those changes in a moment - however because the exercise is quite an easy one, and one of the first arithmetic-based exercises that it should remain always accessible 🙂 |
@@ -0,0 +1,9 @@ | |||
class ArmstrongNumbers { | |||
|
|||
boolean isArmstrongNumber(int i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, just one thing I missed last time; i
is normally only used as a variable name for an index. Maybe numberToCheck
, possibleArmstrongNumber
or inputNumber
or somthing might be more descriptive? :)
Sorry this took so long @FridaTveit - I have been studying for my OCA! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks @sjwarner-bp! :)
As per #1072
Reviewer Resources:
Track Policies