Library
AP Computer Science A
Got a question wrong? Open the notes for that topic.
Teaching this subject? Everything for the classroom in one place →
- Course & Exam Description 2-up
- Revision Sheet 2-up
- Syllabus Checklist 2-up
- Scheme of Work
- Exam Technique 2-up
- Command Words — A3 poster
- Lesson Plans — one page per topic 2-up
- Class Mark Book
1. Using Objects and Methods 38 files
- 1.1 Introduction to Algorithms, Programming, and Compilers
- 1.2 Variables and Data Types
- 1.3 Expressions and Output Past-paper walk-through
- 1.4 Assignment Statements and Input
- 1.5 Casting and Range of Variables
- 1.6 Compound Assignment Operators
- 1.7 Application Program Interface (API) and Libraries
- 1.8 Documentation with Comments
- 1.9 Method Signatures
- 1.10 Calling Class Methods
- 1.11 Math Class
- 1.12 Objects: Instances of Classes
- 1.13 Object Creation and Storage (Instantiation)
- 1.14 Calling Instance Methods Past-paper walk-through
- 1.15 String Manipulation Past-paper walk-through
- 1.1 Introduction to Algorithms, Programming, and Compilers 2-up
- 1.2 Variables and Data Types 2-up
- 1.3 Expressions and Output 2-up
- 1.4 Assignment Statements and Input 2-up
- 1.5 Casting and Range of Variables 2-up
- 1.6 Compound Assignment Operators 2-up
- 1.7 Application Program Interface (API) and Libraries 2-up
- 1.8 Documentation with Comments 2-up
- 1.9 Method Signatures 2-up
- 1.10 Calling Class Methods 2-up
- 1.11 Math Class 2-up
- 1.12 Objects: Instances of Classes 2-up
- 1.13 Object Creation and Storage (Instantiation) 2-up
- 1.14 Calling Instance Methods 2-up
- 1.15 String Manipulation 2-up
2. Selection and Iteration 37 files
- 2.1 Algorithms with Selection and Repetition Past-paper walk-through
- 2.2 Boolean Expressions Past-paper walk-through
- 2.3 if Statements Past-paper walk-through
- 2.4 Nested if Statements
- 2.5 Compound Boolean Expressions
- 2.6 Comparing Boolean Expressions
- 2.7 while Loops Past-paper walk-through
- 2.8 for Loops Past-paper walk-through
- 2.9 Implementing Selection and Iteration Algorithms Past-paper walk-through
- 2.10 Implementing String Algorithms Past-paper walk-through
- 2.11 Nested Iteration Past-paper walk-through
- 2.12 Informal Run-Time Analysis
- 2.1 Algorithms with Selection and Repetition 2-up
- 2.2 Boolean Expressions 2-up
- 2.3 if Statements 2-up
- 2.4 Nested if Statements 2-up
- 2.5 Compound Boolean Expressions 2-up
- 2.6 Comparing Boolean Expressions 2-up
- 2.7 while Loops 2-up
- 2.8 for Loops 2-up
- 2.9 Implementing Selection and Iteration Algorithms 2-up
- 2.10 Implementing String Algorithms 2-up
- 2.11 Nested Iteration 2-up
- 2.12 Informal Run-Time Analysis 2-up
- 2.1 Algorithms with Selection and Repetition 2-upAnswers2-up
- 2.2 Boolean Expressions 2-upAnswers2-up
- 2.3 if Statements 2-upAnswers2-up
- 2.7 while Loops 2-upAnswers2-up
- 2.8 for Loops 2-upAnswers2-up
- 2.9 Implementing Selection and Iteration Algorithms 2-upAnswers2-up
- 2.10 Implementing String Algorithms 2-upAnswers2-up
- 2.11 Nested Iteration 2-upAnswers2-up
3. Class Creation 29 files
- 3.1 Abstraction and Program Design Past-paper walk-through
- 3.2 Impact of Program Design
- 3.3 Anatomy of a Class Past-paper walk-through
- 3.4 Constructors Past-paper walk-through
- 3.5 Methods: How to Write Them Past-paper walk-through
- 3.6 Methods: Passing and Returning References of an Object Past-paper walk-through
- 3.7 Class Variables and Methods Past-paper walk-through
- 3.8 Scope and Access
- 3.9 this Keyword
- 3.1 Abstraction and Program Design 2-up
- 3.2 Impact of Program Design 2-up
- 3.3 Anatomy of a Class 2-up
- 3.4 Constructors 2-up
- 3.5 Methods: How to Write Them 2-up
- 3.6 Methods: Passing and Returning References of an Object 2-up
- 3.7 Class Variables and Methods 2-up
- 3.8 Scope and Access 2-up
- 3.9 this Keyword 2-up
4. Data Collections 47 files
- 4.1 Ethical and Social Issues Around Data Collection
- 4.2 Introduction to Using Data Sets
- 4.3 Array Creation and Access
- 4.4 Array Traversals Past-paper walk-through
- 4.5 Implementing Array Algorithms Past-paper walk-through
- 4.6 Using Text Files
- 4.7 Wrapper Classes
- 4.8 ArrayList Methods
- 4.9 ArrayList Traversals Past-paper walk-through
- 4.10 Implementing ArrayList Algorithms Past-paper walk-through
- 4.11 2D Array Creation and Access Past-paper walk-through
- 4.12 2D Array Traversals Past-paper walk-through
- 4.13 Implementing 2D Array Algorithms Past-paper walk-through
- 4.14 Searching Algorithms Past-paper walk-through
- 4.15 Sorting Algorithms
- 4.16 Recursion
- 4.17 Recursive Searching and Sorting
- 4.1 Ethical and Social Issues Around Data Collection 2-up
- 4.2 Introduction to Using Data Sets 2-up
- 4.3 Array Creation and Access 2-up
- 4.4 Array Traversals 2-up
- 4.5 Implementing Array Algorithms 2-up
- 4.6 Using Text Files 2-up
- 4.7 Wrapper Classes 2-up
- 4.8 ArrayList Methods 2-up
- 4.9 ArrayList Traversals 2-up
- 4.10 Implementing ArrayList Algorithms 2-up
- 4.11 2D Array Creation and Access 2-up
- 4.12 2D Array Traversals 2-up
- 4.13 Implementing 2D Array Algorithms 2-up
- 4.14 Searching Algorithms 2-up
- 4.15 Sorting Algorithms 2-up
- 4.16 Recursion 2-up
- 4.17 Recursive Searching and Sorting 2-up
- 4.4 Array Traversals 2-upAnswers2-up
- 4.5 Implementing Array Algorithms 2-upAnswers2-up
- 4.9 ArrayList Traversals 2-upAnswers2-up
- 4.10 Implementing ArrayList Algorithms 2-upAnswers2-up
- 4.11 2D Array Creation and Access 2-upAnswers2-up
- 4.12 2D Array Traversals 2-upAnswers2-up
- 4.13 Implementing 2D Array Algorithms 2-upAnswers2-up
- 4.14 Searching Algorithms 2-upAnswers2-up
2026 1 files
- 2026 Questions
2015 1 files
- 2015 Questions
2014 1 files
- 2014 Questions
1999 1 files
- 1999 Questions
- AP Computer Science A — Question index 2-up
- 1.3 Expressions and Output 2-upAnswers2-up
- 1.14 Calling Instance Methods 2-upAnswers2-up
- 1.15 String Manipulation 2-upAnswers2-up
- 2.1 Algorithms with Selection and Repetition 2-upAnswers2-up
- 2.2 Boolean Expressions 2-upAnswers2-up
- 2.3 if Statements 2-upAnswers2-up
- 2.7 while Loops 2-upAnswers2-up
- 2.8 for Loops 2-upAnswers2-up
- 2.9 Implementing Selection and Iteration Algorithms 2-upAnswers2-up
- 2.10 Implementing String Algorithms 2-upAnswers2-up
- 2.11 Nested Iteration 2-upAnswers2-up
- 3.1 Abstraction and Program Design 2-up
- 3.3 Anatomy of a Class 2-upAnswers2-up
- 3.4 Constructors 2-upAnswers2-up
- 3.5 Methods: How to Write Them 2-upAnswers2-up
- 3.6 Methods: Passing and Returning References of an Object 2-upAnswers2-up
- 3.7 Class Variables and Methods 2-upAnswers2-up
- 4.4 Array Traversals 2-upAnswers2-up
- 4.5 Implementing Array Algorithms 2-upAnswers2-up
- 4.9 ArrayList Traversals 2-upAnswers2-up
- 4.10 Implementing ArrayList Algorithms 2-upAnswers2-up
- 4.11 2D Array Creation and Access 2-upAnswers2-up
- 4.12 2D Array Traversals 2-upAnswers2-up
- 4.13 Implementing 2D Array Algorithms 2-upAnswers2-up
- 4.14 Searching Algorithms 2-upAnswers2-up
Topic quizzes
- 1. Using Objects and Methods 2-up
- 2. Selection and Iteration 2-up
- 3. Class Creation 2-up
- 4. Data Collections 2-up
Unit tests
- 1. Using Objects and Methods 2-upAnswers2-up
- 2. Selection and Iteration 2-upAnswers2-up
- 3. Class Creation 2-upAnswers2-up
- 4. Data Collections 2-upAnswers2-up
Mock papers
Course companion
Glossary
Topic handouts
- 1.1 Introduction to Algorithms, Programming, and Compilers 2-up
- 1.2 Variables and Data Types 2-up
- 1.3 Expressions and Output 2-up
- 1.4 Assignment Statements and Input 2-up
- 1.5 Casting and Range of Variables 2-up
- 1.6 Compound Assignment Operators 2-up
- 1.7 Application Program Interface (API) and Libraries 2-up
- 1.8 Documentation with Comments 2-up
- 1.9 Method Signatures 2-up
- 1.10 Calling Class Methods 2-up
- 1.11 Math Class 2-up
- 1.12 Objects: Instances of Classes 2-up
- 1.13 Object Creation and Storage (Instantiation) 2-up
- 1.14 Calling Instance Methods 2-up
- 1.15 String Manipulation 2-up
- 2.1 Algorithms with Selection and Repetition 2-up
- 2.2 Boolean Expressions 2-up
- 2.3 if Statements 2-up
- 2.4 Nested if Statements 2-up
- 2.5 Compound Boolean Expressions 2-up
- 2.6 Comparing Boolean Expressions 2-up
- 2.7 while Loops 2-up
- 2.8 for Loops 2-up
- 2.9 Implementing Selection and Iteration Algorithms 2-up
- 2.10 Implementing String Algorithms 2-up
- 2.11 Nested Iteration 2-up
- 2.12 Informal Run-Time Analysis 2-up
- 3.1 Abstraction and Program Design 2-up
- 3.2 Impact of Program Design 2-up
- 3.3 Anatomy of a Class 2-up
- 3.4 Constructors 2-up
- 3.5 Methods: How to Write Them 2-up
- 3.6 Methods: Passing and Returning References of an Object 2-up
- 3.7 Class Variables and Methods 2-up
- 3.8 Scope and Access 2-up
- 3.9 this Keyword 2-up
- 4.1 Ethical and Social Issues Around Data Collection 2-up
- 4.2 Introduction to Using Data Sets 2-up
- 4.3 Array Creation and Access 2-up
- 4.4 Array Traversals 2-up
- 4.5 Implementing Array Algorithms 2-up
- 4.6 Using Text Files 2-up
- 4.7 Wrapper Classes 2-up
- 4.8 ArrayList Methods 2-up
- 4.9 ArrayList Traversals 2-up
- 4.10 Implementing ArrayList Algorithms 2-up
- 4.11 2D Array Creation and Access 2-up
- 4.12 2D Array Traversals 2-up
- 4.13 Implementing 2D Array Algorithms 2-up
- 4.14 Searching Algorithms 2-up
- 4.15 Sorting Algorithms 2-up
- 4.16 Recursion 2-up
- 4.17 Recursive Searching and Sorting 2-up
Lesson slides
Lesson slides
- 1.1 Introduction to Algorithms, Programming, and Compilers
- 1.2 Variables and Data Types
- 1.3 Expressions and Output Past-paper walk-through
- 1.4 Assignment Statements and Input
- 1.5 Casting and Range of Variables
- 1.6 Compound Assignment Operators
- 1.7 Application Program Interface (API) and Libraries
- 1.8 Documentation with Comments
- 1.9 Method Signatures
- 1.10 Calling Class Methods
- 1.11 Math Class
- 1.12 Objects: Instances of Classes
- 1.13 Object Creation and Storage (Instantiation)
- 1.14 Calling Instance Methods Past-paper walk-through
- 1.15 String Manipulation Past-paper walk-through
- 2.1 Algorithms with Selection and Repetition Past-paper walk-through
- 2.2 Boolean Expressions Past-paper walk-through
- 2.3 if Statements Past-paper walk-through
- 2.4 Nested if Statements
- 2.5 Compound Boolean Expressions
- 2.6 Comparing Boolean Expressions
- 2.7 while Loops Past-paper walk-through
- 2.8 for Loops Past-paper walk-through
- 2.9 Implementing Selection and Iteration Algorithms Past-paper walk-through
- 2.10 Implementing String Algorithms Past-paper walk-through
- 2.11 Nested Iteration Past-paper walk-through
- 2.12 Informal Run-Time Analysis
- 3.1 Abstraction and Program Design Past-paper walk-through
- 3.2 Impact of Program Design
- 3.3 Anatomy of a Class Past-paper walk-through
- 3.4 Constructors Past-paper walk-through
- 3.5 Methods: How to Write Them Past-paper walk-through
- 3.6 Methods: Passing and Returning References of an Object Past-paper walk-through
- 3.7 Class Variables and Methods Past-paper walk-through
- 3.8 Scope and Access
- 3.9 this Keyword
- 4.1 Ethical and Social Issues Around Data Collection
- 4.2 Introduction to Using Data Sets
- 4.3 Array Creation and Access
- 4.4 Array Traversals Past-paper walk-through
- 4.5 Implementing Array Algorithms Past-paper walk-through
- 4.6 Using Text Files
- 4.7 Wrapper Classes
- 4.8 ArrayList Methods
- 4.9 ArrayList Traversals Past-paper walk-through
- 4.10 Implementing ArrayList Algorithms Past-paper walk-through
- 4.11 2D Array Creation and Access Past-paper walk-through
- 4.12 2D Array Traversals Past-paper walk-through
- 4.13 Implementing 2D Array Algorithms Past-paper walk-through
- 4.14 Searching Algorithms Past-paper walk-through
- 4.15 Sorting Algorithms
- 4.16 Recursion
- 4.17 Recursive Searching and Sorting
Vocabulary lists
- 1. Using Objects and Methods 2-up
- 2. Selection and Iteration
- 3. Class Creation
- 4. Data Collections 2-up
Flashcards
Weekly vocab tests
- Week 1 · Topic 1 · Using Objects and Methods 2-upAnswer key
- Week 2 · Topics 1–2 · Using Objects and Methods, Selection and Iteration 2-upAnswer key
- Week 3 · Topics 2–4 · Selection and Iteration, Class Creation, Data Collections 2-upAnswer key
- Week 4 · Topics 1–4 · Using Objects and Methods, Class Creation, Data Collections 2-upAnswer key
Weekly homework
Exercise sheets
- Complete pack — exercise sheets + past papers 2-up
- 1 Using Objects and Methods — Part 1 2-upAnswer key
- 1 Using Objects and Methods — Part 2 2-upAnswer key
- 2 Selection and Iteration — Part 1 2-upAnswer key
- 2 Selection and Iteration — Part 2 2-upAnswer key
- 3 Class Creation — Part 1 2-upAnswer key
- 3 Class Creation — Part 2 2-upAnswer key
- 4 Data Collections — Part 1 2-upAnswer key
- 4 Data Collections — Part 2 2-upAnswer key
Past papers
- 1.3 Expressions and Output 2-upAnswers2-up
- 1.14 Calling Instance Methods 2-upAnswers2-up
- 1.15 String Manipulation Answers2-up
- 2.1 Algorithms with Selection and Repetition 2-upAnswers2-up
- 2.2 Boolean Expressions 2-upAnswers2-up
- 2.3 if Statements 2-upAnswers2-up
- 2.7 while Loops 2-upAnswers2-up
- 2.8 for Loops 2-upAnswers2-up
- 2.9 Implementing Selection and Iteration Algorithms 2-upAnswers2-up
- 2.10 Implementing String Algorithms 2-upAnswers2-up
- 2.11 Nested Iteration 2-upAnswers2-up
- 3.1 Abstraction and Program Design 2-up
- 3.3 Anatomy of a Class Answers2-up
- 3.4 Constructors Answers2-up
- 3.5 Methods: How to Write Them 2-upAnswers2-up
- 3.6 Methods: Passing and Returning References of an Object 2-upAnswers2-up
- 3.7 Class Variables and Methods 2-upAnswers2-up
- 4.4 Array Traversals 2-upAnswers2-up
- 4.5 Implementing Array Algorithms 2-upAnswers2-up
- 4.9 ArrayList Traversals 2-upAnswers2-up
- 4.10 Implementing ArrayList Algorithms 2-upAnswers2-up
- 4.11 2D Array Creation and Access 2-upAnswers2-up
- 4.12 2D Array Traversals 2-upAnswers2-up
- 4.13 Implementing 2D Array Algorithms 2-upAnswers2-up
- 4.14 Searching Algorithms 2-upAnswers2-up
Tips
Write every solution by hand, then type it in and run it. The gap between what you thought you wrote and what compiles is where the marks go, and only running it shows you.
Read the scoring guidelines closely — they award points for individual lines and conditions, so a partially working method scores well and a blank one scores zero. Never leave a method empty; write the header, the loop and whatever logic you have.
Method signatures must match the question exactly — name, parameters and return type. It is a free mark to keep and an easy one to throw away.