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

<p>what mc questions did u find hard. Also was the last question’s answer 1 and 3?</p>

<p>Oh you know what i noticed, every frq was discussed other than the tokenpass one. What did you guys write as your constructor for the tokenpass class and what did you guys write for the distributecurrentplayertokenss method.</p>

<p>“Double checking” nice one haha</p>

<p>For the distributecurrentplayertokens method, I used a while loop for the (currentPlayer > 0) and then an if statement to continue adding a variable for the index and add one to each sequential player and an else segment to subtract the length from the variable when it hits the length-1 of the array. I vaguely remember the code I put… For the tokenpass constructor, I used random statements, that’s all I remember. What’d you put?</p>

<p>I was running out on time a lot. There was a lot of tracing you had to do and the conceptual questions caught me off guard. Hopefully I got enough for a 5.</p>

<p>Hey guys, I just wanted to see if anyone would know how many points I’d lose if:
A. I did the math wrong in the Random parts of 2A: (int) (Math.random() * 11) and (int) (Math.random()<em>numPlayers) instead of (int) (Math.random()</em>10) + 1 and (int) (Math.random()* numPlayers-1) + 1 respectively.
B. I decremented a variable that wasn’t supposed to be decremented in a loop, causing it to terminate early in 2B. (one line of code that screws up the postcondition)
C. I put removeSelfFromGrid() in the selectMoveLocation method in 3B.
D. I forgot to initialize the view[][] in 4A and added them to the array without swapping the order in every other row.</p>

<p>I was overconfident after the break and screwed up badly, but I think my MC was above 35, so I feel like I’m on the cusp of a 5. Also, I checked the I and III problem with the ifs and elses and only III worked, but barron’s said I would work, so I only put III on mine. We’ll see though.</p>

<p>(int)(Math.random()*numPlayers) is correct :P.</p>

<p>wait what was wrong with C? i did that too</p>

<p>You can’t change the state of the actor in selectMoveLocation.</p>

<p>@Nidget, oh yeah, I forgot that it doesn’t have to be 1… phew… but still lots of errors.
@misternohnoh makeMove(Location loc) has a statement that if the loc is null, the critter removes itself from the grid, so the early call would cause a side effect</p>

<p>@nidget I think you can change the state of the actor, it’s just “Not in the spirit of Gridworld” to do so, since it causes unintended side effects</p>

<p>You cannot change the state of the actors. It says so specifically in the post conditions of Critter. There’s a dedicated section on the scoring guidelines where you will be deducted 1 point if you violate post-conditions.</p>

<p>@elyvine that wasn’t even intentional :D</p>

<p>For the random numbers, how do those work. If I multiply math.random()*10 will two possible outputs be 10 and 0? or is it 0 through 10 not including 10</p>

<p>Math.random() generates a random double from (0,1). Multiplying by 10 would yield the interval (0,10). (int) truncates the decimal places, so only integers 0-9 are generated.</p>

<p>""“Causation != Correlation”""</p>

<p>Did you get lost on your way to AP Stats O:?</p>

<p>How did you guys do the grid world FRQ?</p>

<p>Where do I get the released free response questions? Or do only teachers get that?</p>

<p>@Nidget The CollegeBoard has the 2013 FRQ for AP CS released, but you’ll need a CollegeBoard account to access it.</p>

<p><a href=“Get the Most Out of AP – AP Students | College Board”>Get the Most Out of AP – AP Students | College Board;

<p>Answers are here:
[2013</a> AP Computer Science Exam Answers | AP Computer Science Exam Review](<a href=“http://apcomputersciencetutoring.com/exam-review/category/exam-answers/2013/]2013”>2013 AP CS A Exam Free Response Solutions)</p>