Ad
  • Custom User Avatar

    "and the speed of the driver will be the same on all roads and can never be negative and the amount of the fine will be accumulated example 95km/h."

    This is hardly understandable. Please make an effort on writing correct sentences.

  • Custom User Avatar

    the fine for exceeding more than 30km/h the fine will be 500 dollars.

    Example (Speed=100, Signals=[110,100,80]-> 250)

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Yes, for me too, since I'm not a native speaker and don't have a driver license :) Anywhay "lower or equal" approach is coorect.

  • Custom User Avatar

    Is a little confusing to think, to me too. But after some refactoring I completed this Kata. Think: you are speaking that 110 produces a fine and 100 no. It don't have sense.

    80 <= 100 ok
    100 <= 100 ok
    110 is not < 100

    Now you only have to calculate the fees :)

  • Custom User Avatar

    Came here to say this. I could not figure out why my test was failing. Then I just thought about it for a second. But, following the logic, it does fail.

  • Custom User Avatar

    Example (Speed=100, Signals=[110,100,80]-> 250)

    output should be 350 since Speed == 100 and 110 and 80 both produce fines - 100 and 250.

  • Custom User Avatar

    Approved ^^

  • Default User Avatar
  • Custom User Avatar

    Approved.

  • Default User Avatar
  • Default User Avatar

    The description should clarify that a speed of 30 or more Kph above the speed limit results in the addition of a $500 fine. As it reads now it indicates that a speed in excess of 30 Kph above the speed limit (but not at 30) results in the added fine. If you follow the instructions as they are right now your tests will fail.

  • Default User Avatar

    yeah sorry lol i was just experimenting with javadoc comments
    edit: also the description was kinda a joke it referenced "this" cuz i removed the this keywords it wasnt about anything else

  • Custom User Avatar

    Btw, I have made the variable names and method names clear to avoid adding comments.

  • Custom User Avatar

    You got a point here. The aspect we often not intuitively think about, but we should care with high standards.
    Often voted best practices are not very explanatory at all. I have a lot to learn too. At the end of the day that's the reason why we are here. Share knowledge. I appreciate your commitment.

  • Loading more items...