*** OFFICIAL 2013 AP Computer Science A Thread***

<p>, they say that about everything but nothing ever happens</p>

<p>@Spazzer</p>

<p>I think you definitely did more than you need to. This is what I did</p>

<p>Initialized array
Initialized loc</p>

<p>for (int r=0;r<numRow;r++)
(for int c=0;c<numCol;c++) //nested
loc = new Location(r,c);
if (grid.get(loc)==null) array.add(loc); //in appendix says grid.get() returns null if unoccupied</p>

<p>return array;</p>

<p>I feel like there is something that I might not have seen though.</p>

<p>That’s what I meant when I said I did more than I need to. That solution is perfectly fine and so is mine, but I just took a much longer time to get to it.</p>

<p>Anyone know how much GridWorldUtilities.getEmptyLocations(getGrid()) will be penalized? Instead of just getEmptyLocations(getGrid())?</p>

<p>Here is a list of penalties from the scoring guideline:</p>

<p>**1-Point Penalty<a href=“w”>/b</a> Extraneous code that causes a side effect or prevents earning points in the rubric
(e.g., information written to output)
(x) Local variables used but none declared
(y) Destruction of persistent data (e.g., changing value referenced by parameter)
(z) Void method or constructor that returns a value </p>

<p>No Penalty
o Extraneous code that causes no side effect
o Extraneous code that is unreachable and would not have earned points in rubric
o Spelling/case discrepancies where there is no ambiguity*
o Local variable not declared, provided that other variables are declared in some part
o private qualifier on local variable
o Missing public qualifier on class or constructor header
o Keyword used as an identifier
o Common mathematical symbols used for operators (x • ÷ < > < > ≠)
o [] vs. () vs. <>
o = instead of == (and vice versa)
o Array/collection element access confusion ([] vs. get for r-values)
o Array/collection element modification confusion ([] vs. set for l-values)
o length/size confusion for array, String, and ArrayList, with or without ()
o Extraneous [] when referencing entire array
o [i,j] instead of *[j]
o Extraneous size in array declaration, (e.g., int[size] nums = new int[size]:wink:
o Missing ; provided that line breaks and indentation clearly convey intent
o Missing { } where indentation clearly conveys intent and { } are used elsewhere
o Missing ( ) on parameter-less method or constructor invocations
o Missing ( ) around if/while conditions
o Use of local variable outside declared scope (must be within same method body)
o Failure to cast object retrieved from nongeneric collection</p>

<p>@kiwiasian
I thought the whole point of adding static in there was TO do GridWorldUtilities.getEmptyLocations(getGrid())? </p>

<p>I remade the class with the numbers in the 1d array being input into the 2d array in that weird order. I accidentally switched the order so the first row would print out in reverse and the row after would print normally, and so on. When also reverse for-looping I did just numCol instead of numCol-1 -.- Hopefully I don’t get too many points taken off because I sort of had the right intentions. Also that getAverage() was quite possibly the easiest FRQ question ever haha</p>

<p>How did u guys do part a of the telescope thing about skyfall and how did you guys do the critter part for gridworld question(part b)
I got destroyed by it</p>

<p>@mathguy</p>

<p>Idk if I did it right but for Skyview…</p>

<p>for (int r=0;r<row;r++)
for (int c=0;c<col;c++)
if ((r%2)==0) view[r][c]=scanned[r<em>(row-1)+c];
else view[r][col-c-1]=scanned[r</em>(row-1)+c];</p>

<p>@Sejine</p>

<p>Java automatically will call the constructor of the super class if you do not write one, although if you did write a constructor and simply called “super();” you should not be penalized since that is still correct.</p>

<p>@Nidget</p>

<p>Amazed you came up with such a simple algorithm. I spent a long time on that question and I utilized 2 nested for loops, pretty sure that my answer didn’t work in all cases but I didn’t really have the time to test it out.</p>

<p>I thought that the multiple choice was reasonably easy, except for the binary conversion (which I just had no idea how to do) and pretty much any question that involved options I, II, and III (I always get really nervous that I missed something on those). The FRQs were stupidly easy except for the constructor of SkyView. Some of the FRQs were like 5 lines of code in total…</p>

<p>MC was a bit of a challenge (mostly time-wise, not so much on content). Maybe just a bit more brainpower and sleep could’ve helped with that one. I learned GridWorld last night starting at around 11, but found both the MC questions and the FR on GridWorld to be simple. No issues with free-response, though I did 4a in a bit of a roundabout way. Do you think they care if we commented all the code? I thought it might make it easier on the graders if everything was properly commented.</p>

<p>thats exactly what i did.</p>

<p>You don’t even need two loops. You can just do one loop and use mod and division to get the coordinates.</p>

<p>Anybody else think that you couldn’t create instance variables in interfaces?</p>

<p>@alexguy you can’t have instance variables in interfaces, but you can have abstract methods in interfaces</p>

<p>@Lightens
There was a question that was like what is false about interfaces and the answer choices included you could instantiate them or you can create instance variables in them. Those were the two I eliminated up to and chose the instance variables one.</p>

<p>@alexguy I chose the one about the instance variables too</p>

<p>@Lightens</p>

<p>It’s important to note that all methods in interfaces are automatically public and abstract. So yeah, the false ones were the other 2. Also anyone else loving that the binary conversion was 42?</p>

<p>@PlayerZero 0.o thanks I didn’t know that! and yea the binary one was a joke! I thought it was going to be hexadecimal</p>

<p>I don’t think you can instantiate interfaces.</p>

<p>You can’t say:</p>

<p>Interface someInterface = new Interface() </p>

<p>I think you can instantiate variables in an interface (it will compile without error) but it won’t accomplish anything from a programming perspective.</p>

<p>That question definitely up in the air though.</p>