Ad
  • Default User Avatar

    Or is there a way to do it in java without using math.round or DecimalFormat?

  • Default User Avatar

    @siebenschlaefer does this mean that this one can't be completed in java until it is fixed? My quest to finish all the 8kyu in java is going down the drain haha

  • Default User Avatar

    Ok, I understand your point
    Thank you

  • Default User Avatar

    I'm alright with that, the point of me writing a kata right now is just to see another way to use java instead of just completing other people's katas.

  • Default User Avatar

    No, but it adds another step to parse it. Thank you for your strongly worded but still appreciated response

  • Default User Avatar

    I'll look into StringBuilder, I've seen some people use it in their solutions in other Kata. Thank you

  • Default User Avatar

    Agreed, I mainly want to write some kata to play around with a the code in a different way than completing other people's kata. I don't mind having Kata being retired. I'm still new to Java and programming so this is a way to immerse myself in the language, just like learning a real life language. I do appreciate your continued suggestions and help very much
    Thanks

  • Default User Avatar

    I don't follow, since the point on passing the number as a string was to have the user parse it into an int

  • Default User Avatar

    Understood. I'll try to figure something out but since I don't really have a grasp of objects and classes yet I do think i might just take the present day off.
    Thank you for helping

  • Default User Avatar

    Update: I found a couple errors in my program that were causing it to change the input incorrectly (some conditionals were missing). Thank you for taking the time to check in, otherwise I wouldn't have found them.

  • Default User Avatar

    I'll run a couple more tests with print statements in my program. My solution is a rather long and roundabout but since my java skills are still basic it was the most I could do.

  • Default User Avatar

    I figured out how to change the Calendar class to be a year ahead in the solution box here , but I haven't gotten any further. Perhaps I will just make it less difficult and set the Kata in a given year permanently so there won't be any current year if I can't figure this out.

  • Default User Avatar

    Hello
    I will try to learn about hardcoding and figure out a way to avoid it. My guess is that instead of setting a variable that would take the current date based on something like the Calendar class, hardcoding means that they just insert 2019 as the year since it's currently 2019. If so, perhaps there is something I can write in the preloaded section of the code or the test case.
    Thank you for pointing it out

  • Default User Avatar

    Update: I saw someone else's comment about spamming attempt, so I tried it. After a few unsuccsessful attempts I was able to submit. Based on this my guess is that there is an inconsistency in the tests or, more likely, my program had some small errors that that last test case wasn't testing for.
    Don't know if that information helps.

  • Default User Avatar

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

  • Loading more items...