6 kyu
Converter
153Mishaboo
Loading description...
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Java Translation
ddd0 unit
,ddd.d unit
the tests should be updated to node 18 (and avoid the use of
var
, and usechai.assert
-> sample tests at least)Cheers
updated
Should there be intermediate rounding (flooring) ? Either way, there could be a test for correct behaviour.
Also,
.toB()
and friends could be expected to return the currentConverter
, so you could chain methods.Good point. Will try to update it later. Thanks
On second thought it's not required in this kata.
The method chaining is not really useful in this kata, no. It's just a good habit to get into.
True. Will try to came up with "chain kata" next time Thanks for idea! ;)
You're welcome! :]
I also chained, felt natural. I was surprised we needed to mutate the converter instance. At first, I expected to return a new instance for each mutation.
suggestion was not implemented