Ad
  • Default User Avatar

    Ohh, whoops. Now i get it. Thanks for explaining :)

  • Default User Avatar

    It doesn't matter anything. What's the difference between giving 50&25 rather then 3 times 25? yes, maybe its not best effiency possible but its still a 75 alltogether and leaves me with no money left in the cashier. Which means I still can't give a 25 change for the last ticket.
    Lets go through the process:

    Got 25, now change=25 -> Now i got 125.
    Got 25, now change=50 -> Now I got 2
    25
    Got 25, now change=75 -> Now I got 325 || 150 & 125
    Got 25, now change=100 -> Now I got 4
    25 || 250 || 150 & 225
    Got 50, Need to pay back 25
    So now Change=75 -> Now I got 3
    25 || 150 & 125
    Got 100, Need to pay back 75
    So now Change=0 -> Now i got 0 ! No cash at all and it doesn't matter the way you pay.
    Got 50, Need to pay back 25
    Not enough change!
    expected:<[YES]> but was:<[NO]>

  • Default User Avatar

    There's a problem with the tester of this kata in test 6, Java.
    I printed everything and this is what I get:

    test6(LineTests)
    Got 25, now change=25
    Got 25, now change=50
    Got 25, now change=75
    Got 25, now change=100
    Got 50, Need to pay back 25
    So now Change=75
    Got 100, Need to pay back 75
    So now Change=0
    Got 50, Need to pay back 25
    Not enough change!
    expected:<[YES]> but was:<[NO]>

    Doesn't make sense. I pass all the other 10 tests except this one. Please fix it.