AP Exam Test Taking Strategies
Objective #1: Be familiar with the test format.
-
The test is made up of 2 sections.
- Part I Multiple Choice - 1 hour 30 mins - The multiple-choice
section will contain 40 questions.
- Part II Free Response - 1 hour 30 mins - The free-response
section will contain 4 questions, each with 3 or 4 parts (a, b, c, and d).
One free-response question is considered the "design question" and will probably ask you to design a class, an abstract class, or an interface and write the class declaration (i.e. write out the class including its properties, constructors, & a few other methods.) See sample free response questions and solutions
from previous years on the College Board Web site.
Be familiar with the Quick Reference materials since you will be able to use it during both parts of the exam.
Review the AP Java Subset at www.collegeboard.com/student/testing/ap/compsci_a/java.html
to be sure that you are familiar with and have reviewed the Java specific
syntax and structures that will be covered on the exam.
-
Review this exam day info page for general tips and advice. Also, see the links along the right-most column on our Java Home Page for many important web pages about the AP exam.
Objective #2: Successfully answer multiple choice questions.
- Often code segments or complete classes are provided with a multiple choice question. It may be specified that the code comes from a client program or not. Sometimes, when a class is provided, they will give you the complete class but other times, the test question may explicitly suggest that there is additional code or implementation not provided as in this example:
public class Bug
{
// constructors implemented here
public int getDirection()
{
return direction;
}
}
In the example above, you are to assume that any necessary constructors are available even though they are not typed out in the exam question. If the comment // constructors implemented here was not spelled out, then you should not assume that any constructors are available in the class.
- Sometimes a multiple choice question will ask you for the best answer. So always read all of the choices before evaluating the best answer since a couple may seem correct.
- Some questions will ask which of the following statements is true while others will ask which of the following statements is false. Read the question and all the choices thoroughly in such cases.
- Some choices will refer to Roman numeral options and sets of options like
(A) I and II
(B) II and III
(C) I and III
(D) I, II, and III
(E) III
With these questions you can often rule out one or more choices by studying only one or two of the Roman numeral options.
- Use the margin of the paper for scratch work when tracing a code segment to determine the values stored in variables.
- It's always best to guess on an AP exam multiple choice question especially if you can rule out one or more of the choices.
- When you take practice multiple choice questions, look up unknown vocab words and terms in our class website. Words like "instance field" and "object reference" are likely to show up on the real AP exam if they show up on multiple choice worksheets and in AP exam workbooks.
- It is a good strategy in loop-tracing exercises to first test the boundary cases. For example, if you have the loop
for (int i = 0; i < arr.length; i++)
{
System.out.print(arr[i] * 2 + " ");
}
then plug in the values 0 and 9 for i first to see what the low and high boundaries that are printed. This may help you rule out wrong answers like: A/ 2 4 6 ...198 and B/ 0 2 4 .... 200
Objective #3: Successfully answer free response questions.
- Watch this comprehensive YouTube video at www.youtube.com/watch?v=LoXeoI0ez1w on how to complete Free Response questions from a veteran AP teacher.
- Typically, you only have to write one method for each part (e.g. a, b, or c) of each of the 4 free response exercises.
Question 1 is usually a sequential search through an array or ArrayList. So you will be using a loop and an if statement.
Question 2 is usually the "Design" question of that year's exam. The Design question is the one where you are given information from which you must create and write out a class possibly including constructors, accessors, modifiers or other interesting methods.
Question 3 is usually a bunch of classes that work together with inheritance (e.g. parent and child classes) or composition (e.g. a class with an ArrayList of other objects as an instance variable)
Question 4 is usually a two-dimensional array and your code will include double-nested for loops!
- It is unnecessary to add comments or follow our class Coding Standards when you answer free response questions. But you should add comments if you want the sympathy or possible partial credit from the test grader. Of course, you should be sure to print legibly so the grader can read your answers.
- Usually the method header is given like this one from year 2014 on question 1 part a
public static String scrambleWord(String word)
- Often, the complete class is given with the method that you must write omitted. Be sure to analyze the whole class to understand how the method that you must write and implement fits into and works with the rest of the class.
For example, in the 2014 Course Description free response exercise #1 part a , the following three classes are given to you in the exercise,
public class Time
{
/** @return difference, in minutes, between this time and other;
* difference is negative if other is earlier than this time
*/
public int minutesUntil(Time other)
{ /* implementation not shown */ }
// There may be instance variables, constructors, and methods that are not // shown.
}
public class Flight
{
/**
@return time at which the flight departs
*/
public Time getDepartureTime()
{ /* implementation not shown */ }
/**
@return time at which the flight arrives
*/
public Time getArrivalTime()
{ /* implementation not shown */ }
// There may be instance variables, constructors, and methods that are not shown.
}
public class Trip
{
/** The list of flights (if any) that make up this trip, stored in chronological order */
private List<Flight> flights;
/** @return the number of minutes from the departure of the first flight to the
* arrival of the last flight if there are one or more flights in the trip;
* 0, if there are no flights in the trip
*/
public int getDuration()
{ /* to be implemented in part (a) */ }
/** Precondition: the departure time for each flight is later than the arrival
* time of its preceding flight
* @return the smallest number of minutes between the arrival of
* a flight and the departure of the flight immediately after it,
* if there are two or more flights in the trip;
* -1, if there are fewer than two flights in the trip
*/
public int getShortestLayover()
{ /* to be implemented in part (b) */ }
// There may be instance variables, constructors, and methods that are not shown.
}
So for example, part (a) is to implement and write out the body of the getDuration method in the Trip class.
You must read the postcondition, draw a diagram if helpful, write some pseudocode to plan your algorithmic steps, and finally writ e the actual code!
You will always be making use of the methods that were given in the classes such as the ones that are black above. You also sometimes need to make use of a method that you implemented in part (a) as part of your answer in part (b)! Also, be sure to use to any instance variables (aka properties) where necessary.
Be sure to review any test cases that are provided such as the table below that is provided for 2014 Course Description exercise #1 part (b).
For example, assume that the instance variable flights of a Trip object vacation contains the following flight information.
Departure Time Arrival Time Layover (minutes)
Flight 0 11:30 a.m. 12:15 p.m.
} 60
Flight 1 1:15 p.m. 3:45 p.m.
} 15
Flight 2 4:00 p.m. 6:45 p.m.
} 210
Flight 3 10:15 p.m. 11:00 p.m.
The call vacation.getShortestLayover() should return 15.
- Here's a checklist of things to be sure you do when answering free response questions.
- read the postcondition that is a simplified version of the complete question description itself. (There is alot of redundancy in the free response questions.) Don't panic if you are confused at first. Mr. Minich often finds these questions confusing when he first reads them. It may take 10-15 minutes of re-reading and drawing diagrams of arrays or ArrayLists to understand what you need to do.
- review and make sure you understand all of the test cases that may have been given to you
- draw a diagram to help understand and interpret the situation especially if the question involves an array or an ArrayList. Plug in sample numbers or strings to help you envision the task you must complete.
- write pseudocode to organize your thoughts and to make an algorithm
- Is a loop necessary? In at least half of the free response exercises, you'll need to use a loop. 99% of the time, you can use a traditional for loop but sometimes a while loop and an enhanced for each loop is easier to use.
- Do you have the correct loop boundaries?
- Don't hardwire your loop with a specific number like i < 10! Instead use arr.length or list.size().
- And, don't iterate too far if you are comparing elements of an array or ArrayList or letters in a String. Sometimes, you'll use word.length() - 1 instead of word.length. In other words, don't be OBOB (off-by-one-bug).
- Did you make use of all the parameters that were passed to the method?
- Did you handle all the boundary cases like
- empty string
- an array or ArrayList with a length/size of zero
- one or more parameters have the value of 0 or 1
- sometimes they specifically tell you that an object variable parameter may be null (which is different from empty string which is also known as null string)
- Identify whether you should be using an if statement or not. Most free response questions involve an if or if else statement. Also, be sure to use == when comparing int values and use the equals or compareTo methods when comparing strings or other object variables.
- Be sure to handle arrays and ArrayLists correctly ([i] vs get(i), etc.)
- Declare and make use of local variables, if necessary. Often it is the programmer's choice as to whether he/she uses extra local variables. Your code is "cleaner" and a bit easier to read if it uses variables.
- Be sure to include a return statement if the method does not have void as its return type. And, be sure to return the correct type of value. For example, don't return an int when a whole array of int's is supposed to be returned.