AP Computer Science A
Java from first expressions to ArrayList data analysis, drilled on the real 42-question, 4-FRQ exam.
- Category
- Math and computer science
- Units
- 4 units
- Exam
- Exam May 12, 2027 (in 227 days)
What the course covers
A college-level first course in programming with Java. You learn to call methods on objects, control flow with selection and loops, design your own classes, and process data with arrays, ArrayList, 2D arrays, and text files. Every unit trains the two things the exam rewards: tracing code exactly (what does this print, which segment works) and writing correct Java to a specification under time pressure.
4 units, with exam weights
Unit 1
Using Objects and Methods
15-25% of examFreeJava from the ground up: algorithms and compiling, the three primitive types (int,double,boolean), expressions with integer division and remainder, casting and overflow, then using existing classes. You call class methods like theMathmethods, create objects with constructors, call instance methods, and manipulateStringobjects with the Quick Reference methods.15 topics
- 1.1Introduction to Algorithms, Programming, and Compilers
- 1.2Variables and Data Types
- 1.3Expressions and Output
- 1.4Assignment Statements and Input
- 1.5Casting and Range of Variables
- 1.6Compound Assignment Operators
- 1.7Application Program Interface (API) and Libraries
- 1.8Documentation with Comments
- 1.9Method Signatures
- 1.10Calling Class Methods
- 1.11Math Class
- 1.12Objects: Instances of Classes
- 1.13Object Creation and Storage (Instantiation)
- 1.14Calling Instance Methods
- 1.15String Manipulation
Unit 2
Selection and Iteration
25-35% of examThe control structures that make algorithms: Boolean expressions,if,if-else, andif-else-ifchains, compound conditions with short-circuit evaluation and De Morgan's laws, thenwhileandforloops, nested loops, and the standard algorithms built from them for numbers andStringobjects. Ends with counting how many times a statement runs.12 topics
- 2.1Algorithms with Selection and Repetition
- 2.2Boolean Expressions
- 2.3if Statements
- 2.4Nested if Statements
- 2.5Compound Boolean Expressions
- 2.6Comparing Boolean Expressions
- 2.7while Loops
- 2.8for Loops
- 2.9Implementing Selection and Iteration Algorithms
- 2.10Implementing String Algorithms
- 2.11Nested Iteration
- 2.12Informal Run-Time Analysis
Unit 3
Class Creation
10-18% of examDesigning and writing your own classes: abstraction and class diagrams, the social and legal impact of programs, encapsulation withprivateinstance variables, constructors, accessor and mutator methods, passing and returning object references,staticvariables and methods, scope, and thethiskeyword. This unit is the whole of free-response Question 2.9 topics
- 3.1Abstraction and Program Design
- 3.2Impact of Program Design
- 3.3Anatomy of a Class
- 3.4Constructors
- 3.5Methods: How to Write Them
- 3.6Methods: Passing and Returning References of an Object
- 3.7Class Variables and Methods
- 3.8Scope and Access
- 3.9this Keyword
Unit 4
Data Collections
30-40% of examThe heaviest unit. Ethics of data collection and working with data sets, then 1D arrays, reading data from text files, wrapper classes,ArrayList, and 2D arrays, each with its standard traversals and algorithms. Finishes with linear search, selection and insertion sort, and tracing recursion, binary search, and merge sort. Free-response Questions 3 and 4 come from this unit.17 topics
- 4.1Ethical and Social Issues Around Data Collection
- 4.2Introduction to Using Data Sets
- 4.3Array Creation and Access
- 4.4Array Traversals
- 4.5Implementing Array Algorithms
- 4.6Using Text Files
- 4.7Wrapper Classes
- 4.8ArrayList Methods
- 4.9ArrayList Traversals
- 4.10Implementing ArrayList Algorithms
- 4.112D Array Creation and Access
- 4.122D Array Traversals
- 4.13Implementing 2D Array Algorithms
- 4.14Searching Algorithms
- 4.15Sorting Algorithms
- 4.16Recursion
- 4.17Recursive Searching and Sorting
The exam, part by part
2 parts, 3 h in all.
Section I: Multiple Choice
- Questions
- 42
- Time
- 1 h 30 min
- Weight
- 55%
No calculator
Format details
Four choices (A-D) per question. Discrete items plus short sets that share one class or code segment. Covers all four units; the Java Quick Reference is available throughout.
Section II: Free Response
- Questions
- 4
- Time
- 1 h 30 min
- Weight
- 45%
No calculator
Format details
Task types: methods-control-structures, class-design, data-analysis-arraylist, 2d-array
Always one of each type, in this order: Q1 Methods and Control Structures (7 pts), Q2 Class Design (7 pts), Q3 Data Analysis with ArrayList (5 pts), Q4 2D Array (6 pts). 25 raw points. Code is typed in Bluebook and is never compiled or run.
How the 1 to 5 score is set
Section I (42 multiple-choice questions) counts for 55% and Section II (4 free-response questions, 25 raw points) counts for 45%. Each section is scaled to its weight and the two are added into a composite score, which College Board converts to a 1-5 AP score using cut points set for each exam. There is no penalty for wrong answers, so answer every multiple-choice question. Free-response points are awarded by criterion: most points check one specific requirement and can be earned even when other parts are wrong, while one or two points per question labeled (algorithm) require all the steps assembled correctly.
What you bring and get
The exam is fully digital in the Bluebook app. The Java Quick Reference (the accessible String, Integer, Double, Math, ArrayList, File, Scanner, and Object methods) is available in Bluebook for both sections, and schools may also hand out a printed copy. Scratch paper is provided, but only typed responses are scored. Calculators are not permitted (except a four-function calculator for students with an approved accommodation).
Skills the exam scores
1.ADesign Code: choose a program design
Decide on an appropriate program design, such as which classes, data, and methods, to solve a problem or accomplish a task.1.BDesign Code: extract knowledge from data
Decide what information a data set can and cannot answer, and what data is needed for a given question.2.ADevelop Code: implement an algorithm
Write Java that carries out an algorithm with expressions, selection, and iteration.2.BDevelop Code: data abstractions
Write Java that creates and uses data abstractions: objects, classes, arrays,ArrayList, and 2D arrays.2.CDevelop Code: procedural abstractions
Write Java that defines and calls methods, including library methods from the Java Quick Reference.3.AAnalyze Code: statement execution order
Determine the output or result of code by following the order in which statements execute.3.BAnalyze Code: data abstractions
Determine the output or result of code that uses objects, arrays,ArrayList, or 2D arrays.3.CAnalyze Code: procedural abstractions
Determine the output or result of code that calls methods, including recursive methods.3.DAnalyze Code: find and fix errors
Explain why a code segment will not compile or will not work as intended, and change it so it does.4.ADocument Code: describe behavior
Describe in words what a code segment or program does.4.BDocument Code: initial conditions
Describe the preconditions that must hold for a code segment to work as intended or described.5.AUse Computers Responsibly: impact
Explain how computing affects society, the economy, and culture, including privacy, bias, reliability, and intellectual property.