For the task "Whole family together", a small tip that you will be able to figure out everything except just one thing and so don't dwell on it too much just go ahead and see the solution if it comes to that coz the solution might be something that you never learnt about.
C'mon i melted my brain and got two functionals solutions to going national and neither gets approved.. so i download correct solution and i find things i never saw in my life.
The conditions of 'The whole family together' task implies that we cannot use a constructor ("The Human Class must have Method")... which makes the task incredibly annoying. While either solution is deemed correct, the conditions should be clear since using a constructor is clearly more appropriate.
I believe something is broken here. There are two tasks missing on the website, that are visible in IDE. Only after I finished these tasks on IDE I got the achievement. The missing tasks were "We don't need repetitions" and "Only for the rich".
task0828 (Month number) caveat: one of the task requirements is 'The program must use collections.'. Simply creating a collection à la
new LinkedList<Solution>();
is not enough, however. I got the nonsense to pass by stuffing the calculated result into a LinkedList<Integer> and pulling it out in the println via getFirst().
These unstated nonsensical requirements are rather frustrating...
these were not easy, but learned a lot (hope I can remember it all). I'm glad people take time to answer the posted questions. between googling and the comments, was able to solve all the tasks. On to level 9!! Happy coding! :)
Animal set. It was given in the program code to call the printPets() method twice; however requirement 7 states, "The printPets() method should display all the animals in the set pets." The validator did not accept the version with both print calls, but did accept it once the second was removed. Tricky indeed, so got it in 2 tries.
Set of cats. My code was correct for the printout required; however the validation failed on 3 counts. Evidently, it didn't want a field in the Cat class, nor in the default constructor. Once these were removed, it cleared 3 of the conditions flagged by the validator and passed. Hope this helps.
GO TO FULL VERSION