#Bird Watcher in Java
28 messages · Page 1 of 1 (latest)
task1 it says to get last week numbers
i assume it's an array stored somewhere
the exercise itself gives me the numbers, but am i supposed to store them inside the getLastWeek function?
and return them
yep, you can certainly do that.
last week always has those numbers
so you can either generate them inside the function, or outside (right below the birdsPerDay array for instance)
by generate what do u mean?
just type them manually
the exercise is about arrays so that's what you should be returning from this function
int[] lastWeekBirds = {0, 2, 5, 3, 7, 8, 4};
return lastWeekBirds;
//throw new UnsupportedOperationException("Please implement the BirdCount.getLastWeek() method");
}```
press the "run tests" button to see if the relevant tests pass
i don't understand if i should think of this exercise as a single big program or if these functions are kinda apart from each other
it feels kinda weird
in general it's a single program, you are free to use one function inside another
but each task will often correspond to a single function
i see now
you are welcome. Now, on to the next one 🙂 Cheers.
what do you think of these bundles?
I bought both of those bundles because I'm a biblioholic. But will I read them all? Probably not. Good stuff in them, though.
yeah, too bad the beginner stuff isn't in the 1$ tier