4 Strategies to Help You Do Your Best on the Exam

5 Steps to a 5: AP Computer Science A 2024 - Klipp D.B., Johnson D.R., Paymer C.A. 2023

4 Strategies to Help You Do Your Best on the Exam
STEP 3 Develop Strategies for Success

IN THIS CHAPTER

Summary: This chapter supplies you with strategies for taking the Multiple-choice and the Free-response sections of the AP Computer Science A Exam. The strategies will help you earn all the points you deserve.

Image

Key Ideas

Image Many questions require you to read and process code. Practice by hand-tracing hundreds of pieces of code.

Image When you do not know a Multiple-choice answer, eliminate choices you know are incorrect and guess. There is no penalty for guessing.

Image You need to understand how points are awarded on the Free-response section and when deductions are taken.

Image You should make an attempt to write some kind of response to every Free-response question, even when you feel you do not understand the question or know the answer. You may earn a point or two even if you do not answer the whole question or get it all right.

Image On the Multiple-choice section, you must clearly understand the difference between the System.out.print() and System.out.println()statements and be able to read code that uses each of them. However, on the Free-response questions, it is unlikely that you will need to use a System.out.print() or System.out.println() statement. If you use one unnecessarily, you will be penalized 1 point.

Strategies for the Multiple-Choice Section

The Multiple-choice section of the exam determines how well you can read someone else’s code. There are many problems involving the fundamentals of programming such as if and if-else statements, looping structures, complex data structures, and boolean logic. Some of the questions have to do with recursion, class design, and inheritance.

Hand-Tracing Code

Hand-tracing code is the act of pretending you are the computer in order to predict the output of some code or the value of a variable. A large number of the questions on the Multiple-choice portion require you to read and process code. You should hand-trace hundreds of sample pieces of code to prepare for the exam.

Image

Do not Do Too Much in Your Head!

It’s very easy to make mental mistakes when hand-tracing code. Write out the current values of all the variables in the white space that is provided on the exam.

When You Do not Know, Guess

There is no penalty for guessing on the Multiple-choice questions. Make sure you eliminate the choices that do not make sense before guessing. If you are running out of time, quickly make guesses for the questions you weren’t able to get to.

Read All of the Options Before Selecting Your Answer

Before you fill in the bubble, be sure to look at every one of the options. It’s possible that you may have misunderstood the question. Looking at each of the choices could help point you in the right direction. However, some people disagree and say it’s a waste of time to read all answer choices. So, if you prefer, only take this advice when you feel it will help.

Input from the User

You will never have to write code that asks for input from the user. Instead, the question will make a generic statement in the form of a comment that shows that they are requesting input from the user as in the example below.

Image

Generic Input from the User

The AP Computer Science A Exam will use a generic reference to show input from the user. When you see this, just assume that the variable receives an appropriate value from a nameless, faceless user.

Image

Strategies for the Free-Response Section

The Free-response section of the exam determines how well you can write your own code. Although there are an infinite number of possible questions that could be asked, they will always fall into these four categories:

• Question 1 will require you to implement and call methods. The methods will use control structures like loops and if statements, but there will be no data structures involved.

• Question 2 will require you to design and implement a complete class.

• Question 3 will require the use of arrays and/or ArrayLists.

• Question 4 will require the use of 2D arrays.

How the Free-Response Questions Are Graded

The Free-response question (FRQ) section is graded by an expert group of high school and college computer science teachers and professors, referred to as “readers.” A real person who knows computer science will be reading your code to determine if you have solved the problem correctly. Your written code must be readable by another human being, so do your best to write legibly.

The Intent of the Question

Every year, the intent of each question is explained to the people who are grading the test as part of their training. This is normally a one-line statement that describes the purpose of the question. You should try to predict what the intent of the question is for each of the Free-response questions when you are taking the exam. Thinking about the intent of the question will help you see the big picture and then zero in on writing the code that solves the problem. If you are oblivious to the intent of the question, then you are likely to go off course and solve a problem that is not the point of the question.

Scoring Guidelines

In order to help the exam readers be consistent when grading tens of thousands of exams, a scoring rubric is used. This rubric dictates how many points are awarded for writing valid code that solves specific components of the problem. The problem is broken down into its most important components and each of these is assigned a point value. The total of all of these components from all sections (a, b, c, etc.) is 9 points.

Scoring for the Free-Response Questions

You start off with zero points for each Free-response question. As the reader finds valid code that is part of the rubric, you earn points. Each component of the rubric is worth 1 point. Your goal is to earn 9 points, the maximum awarded for each question.

1-Point Penalty

After your response is graded against the rubric and your maximum score is calculated, the reader decides if points should be deducted from your total. If you break a major rule, then points are subtracted from your total. The current 1-point penalties include:

Array/collection access confusion

You must use the correct syntax when accessing elements in arrays (use [ ]) and ArrayLists (use the get method).

Extraneous code that causes side effects

This is a fancy way of saying your code doesn’t compile or you have written a System.out.print() or System.out.println() statement when you weren’t asked to print anything. Do not ever print anything to the console unless it is stated in the problem description!

Local variables used but none declared

Be sure to declare every variable before using it.

Destruction of persistent data

Anything that is passed to a method or constructor should be left alone. Do not change the argument that is passed. Reassign it to a different variable and only modify that one.

Void method or constructor that returns a value

Do not ever have a return statement in a void method or constructor.

You Can’t Get a Negative Score

• The readers won’t deduct points if you haven’t earned any points.

• Penalty points can only be deducted in a part of the question that has earned credit so they won’t take away points from a different section.

• A penalty can be assessed only once for a question, even if it occurs multiple times or in multiple parts of that question.

Non-Penalized Errors

I feel a little guilty telling you this and as a teacher it goes against my philosophy, but I’m going to tell you anyway. The readers of the exam are told to look the other way when seeing certain kinds of errors for which they would normally deduct points in their classroom. A full list is found in the Appendix, but here are a few of them:

• Using = instead of = = and vice versa

• Confusing length and size when using an array, ArrayList, or String

• Using a keyword as a variable name

• Confusing [] with () or even <>

• Missing { } where indentation clearly conveys intent

Now listen up! I’m not telling you to be careless when you write your code or to make those mistakes on purpose. I’m just telling you that, on the AP Computer Science A Exam, the readers will ignore minor syntax mistakes like these.

What Is Valid Code?

Any code that works and satisfies the conditions of the problem will be given credit as valid code. Please remember the readers are humans; so do not go writing crazy, Rube Goldberg—style code to solve a really easy problem. When in doubt, go at the problem in the most straightforward, logical way and stick to the AP Computer Science A Java subset.

Image

Fun Fact: Rube Goldberg was a popular cartoonist who depicted gadgets that performed simple tasks in indirect, convoluted ways. He is the inspiration behind the many Rube Goldberg Machine Contests that are held worldwide.

Brute Force Versus Efficiency and Elegance

There are many ways to solve problems in our world. As a programmer, your goal is to find the most elegant way to solve any problem. Sometimes that comes easy and other times, not so much.

On the AP Computer Science A Exam, elegance and efficiency are not considered (unless the problem specifically asks for it). When you are asked to write code to solve a problem, try to go at the problem in the most reasonable way first. If you can’t think of an efficient way to solve the problem, then use brute force. In other words, if the solution doesn’t come to you, crank out the code in a way that works even if it is a really slow way to solve the problem.

Image

Answer the Question

Above all else, answer the question. Or at least, make an attempt at it. Do not be afraid to write something down even if you do not have a full solution. Remember that the rubric for every question has components that are pieces of the solution. The one thing that you put down just may be a component that will get you a point or two.

Comments Are Not Graded

Do not spend time writing comments for your Java code. The readers will not read anything that is part of a Java comment.

Cross Out, Do Not Erase

If you think of a new solution, write it out first and then cross out the old one. Do not waste time by erasing the old solution. The readers are trained to ignore anything that is crossed out.

Output to the Console

On the AP Computer Science A Exam, the use of output statements is a little strange. On the Multiple-choice section, you must clearly understand the difference between the System.out.print() and System.out.println() statements and be able to read code that uses each of them.

However, on the Free-response questions, it is unlikely that you will be asked to write a System.out.print() or System.out.println() instruction! You will lose points if the reader reads any kind of output statement in your response to a Free-response question if you weren’t asked to do so in the problem description.

Image

Output to the Console!

In general, on the Free response section, it is highly unlikely that you will be asked to write a System.out.println statement. So, if they do not ask for it, do not write one. You will get penalized if you write one and they do not ask you to.