<p>@bigvinu yes an enhanced for loop will iterate over null spaces. however, null instanceof horse will return false (will not generate a nullpointerexception)</p>
<p>@aweaweg: the chief question is always “does it work”. The choice of what method to override usually isn’t the issue … unless, as you point out, the choice of method means that it doesn’t always work. :)</p>
<p>@defianced: both of those look right. (The first time I tried consolidate(), I wrote a very similar bubble-sort-esque algorithm.)</p>
<p>@bigvinu: like @njdevs, I’m concerned that the last line won’t work … I don’t think there’s an automatic conversion from ArrayList to arrays.</p>
<p>@ckfy63a: I think you need to initialize index to climbList.size(), not climbList.size()-1. Otherwise, there’s no way to add an item to the very last position in the list.</p>
<p>@jkhuggins: But wouldn’t that get an ArrayIndexOutOfBoundsException? Let’s say climbList.size() was 6, then index 6 would be out of bounds, yes?</p>
<p>@ckfy63a, I think jkhuggins is right. If you add a ClimbInfo object to the list at climbList.size()-1, that would mean the added object is the second-to-last object in the list when you want it to be the last. The method throws an ArrayIndexOutOfBoundsException if index > size(), according to [the</a> documentation](<a href=“JDK 20 Documentation - Home”>JDK 20 Documentation - Home), so index = size() is ok.</p>
<p>@aweaweg: Ah, I see now. Thanks for the clarification. I was thinking of Arrays as opposed to ArrayList. How many points would they deduct for that then?</p>
<p>@aweaweg and @ckfy63a: even without knowing the rubric, it’s hard to say … it all depends on how many things get affected by the error. Rubrics tend to be written in terms of 10-20 “local features” that need to be correctly present in every correct solution, with each feature being assessed 0.5-1.0 points. A lot of the errors we’ve discussed, like @ckfy63a’s loop bound problem, tend to only affect one local feature and thus end up as just 0.5-1.0 point deductions. Something more systematic, like @aweaweg’s choice of methods to override, <em>might</em> end up affecting multiple local features, and so <em>might</em> end up with more deductions, depending on exactly how things get fouled up in general.</p>
<p>I realize that sounds vague … but it’s hard to say much more than that. Each problem is different. (Insert usual disclaimers here …)</p>
<p>Actually, APCS is graded in Cincinnati. (There are five different grading sites; different exams are graded in different places.) The APCS reading this year is June 2-8. Leaders will show up a few days earlier.</p>
<p>In the Gridworld problem, I didn’t set prevLoc and prevDir to the current location and direction until inside the overridden act method (before calling super.act()). I failed to see that this would generate an error if restore was called before act has been. I know a bunch of my classmates did the same as well. Does that seem like a one point deduction?</p>
<p>I think I did the least efficient alphabetizing of all time for 1b (I have no idea why I wrote code as if the other peaks weren’t already in order, but it ended up with many lines of code and two for loops. Whoops!), but I doubt I’ll lose points for general foolishness.</p>
<p>When consolidating horses, do you think the following would work: using a for loop to find the total number of horses in the barn, using a for loop that swaps a horse with an empty stall if the stall’s index is one less than the horse’s, and a recursive call of consolidate if there are any empty stalls between index 0 and totalNumHorses-1 (to account for one for loop not being enough if there are consecutive empty stalls).</p>
<p>I can’t remember whether I put an if statement setting pixelCount to 0 if it was negative or not. This is really going to bother me, seeing as the latter would probably result in a fairly large deduction.</p>
<p>Thanks for any feedback! I know I should just wait for my official score and not freak out or become addicted to CC, but I’m really nervous because I only get credit for a 5, which is tough for a novice programmer to get when so many peers have years of experience.</p>
<p>Hey guys, I tried looking this up, but I couldn’t find anything. For the horse question I treated spaces as an arraylist instead of an array. Does anyone know what the penalty will be?</p>