


The term superclass is not intended to imply importance or complexity, but rather indicates that the superclass is above a subclass in a class hierarchy. The list after each step is below.Ī superclass contains fields and methods that are used by all of its subclasses. The Quick Reference contains documentation for each ArrayList method called. Answer E stores the correct variable but does not use the temporary variable.Īnswer D correctly stores one of the values in the temporary variable, overwrites the original copy then retrieves the temporary copy. Answer C uses a temporary variable but stores the wrong value. Interchanging, often called swapping, the values of at 2 positions in an array, or in an ArrayList requires the use of a variable to store the value that would otherwise be lost when one value in the array is replaced with the other.Īnswers A and B fail to use a temporary variable. It is possible for grade to be incremented by 0, 5, 10 or 15 points depending on the values of the variables. The condition in Case II evaluates to true if at least 1 of the variables is true, which is not the intent.Ĭase III: The conditions are evaluated independently.


This correctly implements the intended condition.Ĭase II: The || operation is true if at least 1 operand is true. For the condition to evaluate to true all 3 variables must be true. The condition in Case I is evaluated as (bonusOne & bonusTwo) & bonusThree. Question 2Ĭase I: The & operation evaluates to true if and only if both operands are true. value is incremented after the call to println and the loop stops when value = 28 so the last number output is 27. Value is unchanged before it is printed the first time, so the first number output is 15. Inheritance & Polymorphism Practice Problems.StockpileCritter Free Response Solution.Review the 2009 AP CS A Exam Multiple Choice with AP CS Tutor Brandon Horn. Refer to the College Board product for the original questions and for the letter answers. You must purchase the released exam itself from the College Board’s Online Store. Question by question explanations for the 2009 AP Computer Science A Multiple Choice Section are below. While their released exam includes detailed explanations for each free response question, it does not offer detailed explanations for each multiple choice question. The College Board released the complete 2009 AP Computer Science A Exam, including the multiple choice section.
