Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Rejected by someone
Oh thanks, I had already found that. Added random tests
Good point, I refactored to just take in the BigDecimal
Passing in currency values as
String
s rather thanBigDecimal
s is already not following best practice, so what's the point?Can you expand on what you mean by no random tests?
I didn't say that it wouldn't work. It is a note for best practice when working with currency values in Java.
This is not actually true, since this is never tested; using
double
can also pass the tests.In fact, all the inputs are integral values, so even using
int
can pass the tests.No Random Tests
Those tests have now been removed
There's no such requirement in the kata.
There's no such requirement in the kata.
A mix of spaces and tabs is used for indentation.
This comment is hidden because it contains spoiler information about the solution
Thanks! I forked your Java translation and recreated the original test cases. Everything else has been flawless
In what format? 4 numbers can mean anything.
I didn't even pay attention, but your tests aren't enough:
{0,0,100,100}, {0,0,100,150}
: both our codes would return true, for this!and note that once you'll corret that, you'll need to handle floating point errors.
hi,
Sorry, but your kata is way too much of a classic (we already have sevral katas about that kind of stuff). Moreover, it's lacking random tests.
Loading more items...