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

<p>Wow … such activity … gee, is the exam tomorrow or something? :)</p>

<p>@sup210: the scoring cutoffs are different every year; they depend on how difficult or easy the problems (in particular, the FRQs) turn out to be. The cutoffs aren’t set until after all the FRQs are scored and the statisticians can look at the scores and perform their magic.</p>

<p>@danebrick: the late exams are not designed to be any more or less difficult than the regular exams. Of course, no two exams are equivalent, so one never knows … but they try hard to keep them at the same difficulty level.</p>

<p>@aeneas909: most of the time, FRQs are not graded based on efficiency. The one exception to this is that on multi-part questions, you may be instructed to use the method you wrote in part (a) as part of your solution to part (b); in that situation, re-implementing the code again (which is a kind of “inefficiency”) might result in a deduction. But, most of the time, if it works, it’s eligible for full credit, regardless of how long it takes.</p>

<p>@Falwethiel: what happens if you do poorly? Nothing, really. You probably won’t get any college credit for the exam. But you’ll still have learned something in your course, and hopefully that will make your first college CS course easier.</p>

<p>@Matthew5
The “this” operator is largely superfluous, and often only meant to improve the readability of your code. It refers to the object currently in the process of executing the method, and is almost unanimously the same as just calling the method without the “this” from within the method being executed. “this” only represents the object, or instance of the class, executing the method, rather than the class as a whole.</p>

<p>damn, APCS exam is tomorrow… getting pretty nervous/excited; good luck to whoever else is taking it!</p>

<p>hugeeee wall of text btw:</p>

<p>@Matthew5
assuming i’m not wrong, I’ll tell you what I know.
Here are a few things you should already know though.</p>

<p>(just adding onto what @cagg333 stated)</p>

<ul>
<li>Abstract classes or interfaces can NOT be instantiated. This doesn’t mean that it the object can’t be a type of the abstract class.
EX:
// assume there are some methods/variables inside, too lazy to implement them.
public abstract class AbstractClass{
}</li>
</ul>

<p>public class SubClassOfAbstractClass extends AbstractClass{
}
AbstractClass obj = new AbstractClass(); // illegal, you CANNOT create an instance of an
abstract class.
AbstractClass obj = new SubClassOfAbstractClass(); // works fine. (of course, if you wish to access certain methods within SubClassOfAbstractClass, it will be required to downcast the type back to SubClassOfAbstractClass)</p>

<ul>
<li>Abstract classes can provide implementations( or definitions) of its methods unlike interfaces.
EX:
// as you can see, this abstract class has both 1) a method that requires its subclasses to define, and 2) 2 methods that are already defined in the class.</li>
</ul>

<p>public abstract class ClassOne{
public void someMethod(){
System.out.println(“Wheee”);
}
public int OnePlusOne(){
return 1+1;
}
public abstract void someMethod2(); // requires implementation in its subclass. Abstract
// methods can be defined within the class where it
// has been declared abstract.
}</p>

<p>public interface someInterface{
public void someMethod(){ // wrong. an interface CANNOT have implementations within
System.out.println(“Wheee”); // its self.</p>

<p>public void someMethod2(); // both of these are perfectly acceptable. By implementing
public void someMethod3(); // interfaces, it is required that the methods from the interface
// will be defined within the ‘subclass’. (class that implements
// the interface)
}
}</p>

<ul>
<li>Abstract classes can contain instance variables, while interfaces cannot.
ex:
An abstract class can contain any variables, while interfaces can’t.
private String someString; // allowed in abstract class, not in interface.
private int iSomeInt; // allowed in abstract, not in interface.
private boolean bSomeBool // read above statement
private double dSomeDouble // read above statements</li>
</ul>

<p>There are times of when you should contemplate when using an interface is more appropriate than using an abstract class. Here are some things to keep in mind when deciding which to use: (Definitions via Barron’s book)

  • use abstract class for an object that is application-specific, but incomplete without its subclasses.
  • Consider using an interface when its methods are suitable for your program but could be equally applicable in a variety of programs.</p>

<p>if you need any clarifications, just leave a message.</p>

<p>its not superfluous if you are passing it in as a parameter, right?</p>

<p>Does anybody have answers for the multiple choice on the 2008 exam?</p>

<p>@MITIsMyDream: Alright thanks, but didn’t Cagg say before that both Abstract Classes and Interfaces can have instance variables and constructors (on page 16 of thread)? Or is he wrong about that?</p>

<p>I know this question has already been posted in this thread, but I am confused about a different aspect of the question.</p>

<p>

<a href=“http://i.imgur.com/cdL9XvR.jpg[/IMG]”>http://i.imgur.com/cdL9XvR.jpg

</a></p>

<p>The correct answer is {1, 2, 3, 4, 5, 6}.</p>

<p>Can someone explain to me where the 6 comes from at index 5?</p>

<p>@Matthew5 @MITIsMyDream: I do apologize if I was incorrect, but I can recall using variables in an interface. Are you positive they can’t be declared?
Edit: I just reread my Baron’s book on this, yes, you are correct, Interfaces cannot contain instance variables. I apologize.</p>

<p>Interfaces can have declared constants, but not “variables”.</p>

<p>@Cagg, variables CAN be declared in an interface, they’ll just have to be a declared a constant and public though, so: public static final int var1; So basically, a constant at the end of the day.</p>

<p>@kiwiasian: the 6 is not stored in the array; it’s simply the result of the very last println() statement at the end of the method (note: it’s not in the loop).</p>

<p>Going to sleep in about 10 mins after studying for 15 hours spread over 3-4 days… Hopefully it pays off, I wish everyone the best of luck on the exam!</p>

<p>I can feel you man, good luck in the morning! May the Free Response be with us!</p>

<p>@AverageClone, ^^ YES may the FRQs be with us. Good luck to all! I am also going to sleep. I kinda crammed over the weekend and today.</p>

<p>Oh man, good luck everyone. Let the FR be with us, indeed. (I’m gonna need it)</p>

<p>Does anyone have some test-taking strategies to share?</p>

<p>we get the quic k reference on the whole test right?</p>

<p>nvm ik nowowow</p>

<p>I still need to review sorting and searching algorithms - can someone give a run over the algorithms covered on the AP CS exam?</p>

<p>For part (b) would this be valid:</p>

<p>public void addClimb(String peakName, int climbTime)
{
int index = 0, k = 0;
while( index == 0 && k < climbList.size() )
{</p>