AP Computer Science A — Course Home

★ This course is designed to prepare students to take the AP Computer Science A Exam ★
Excerpts from the course overview were taken from AP College Board.


AP Computer Science A Course Overview

AP Computer Science A is an introductory college-level computer science course that introduces one of the most popular programming languages to students. Fundamental topics include the design of solutions to problems, the use of data structures to organize large sets of data, the development and implementation of algorithms to process data and discover new information, the analysis of potential solutions, and the ethical and social implications of computing systems. The course emphasizes object-oriented programming and design using the Java programming language.

The following big ideas serve as the foundation of the course:

Big Idea

Description

Modularity

Object-oriented programming allows us to use abstraction to break complex programs into individual classes and methods.

Variables

Variables create data abstractions, representing a set of possible values or a group of related values.

Control

Doing things in order, making decisions, and repeating processes are represented in code using control structures.

Impact of Computing

Computers have revolutionized our lives. To use computing safely and responsibly, we must be aware of privacy, security, and ethical issues.

For this course we will use various Integrated Development Environments (IDEs) to manage programs, data files, and images. Coding Rooms is our primary online IDE. For personal development and collaboration, online IDEs allow peer collaboration. Students using a personal laptop may install VS Code as a desktop IDE.


Oracle Java Foundations — Course Goals

This course also prepares students to sit for the Oracle Java Foundations Certification Exam (1Z0-811). The exam consists of 75 multiple-choice questions (150 minutes, 65% passing score). Students who master AP CSA content are well positioned to earn this industry-recognized credential.

Oracle 1Z0-811 Exam Domain Alignment

1Z0-811 Exam Domain

AP CSA Unit Connection

Topic 2: Basic Java Elements — syntax, comments, java.lang

Unit 1 — program structure, semicolons, comments, java.lang package

Topic 3: Working with Java Operators

Unit 1 — arithmetic, assignment, relational, and logical operators

Topic 4: Working with the Math and Random Classes

Unit 1 — Math.sqrt(), Math.pow(), Math.random(), Math.PI

Topic 5: Working with the String Class

Unit 1 — String methods, concatenation, comparison, charAt(), substring()

Topic 6: Decision Statements

Unit 2 — if, if-else, else-if, switch statements

Topic 7: Loop Constructs

Unit 2 — while, for, enhanced for, do-while loops

Topic 8: Arrays and ArrayLists

Unit 4 — 1D arrays, 2D arrays, ArrayList creation and traversal

Topic 9: Classes and Constructors

Unit 3 — class design, constructors, instance variables, encapsulation

Topic 10: Static Methods and Overloading

Unit 3 — static vs. instance methods, overloaded methods

Topic 11: Exception Handling

Units 2/3 — try-catch blocks, runtime errors, ArithmeticException


Syllabus

Expectations

  • Be on time for class. Students should be seated, logged into Canvas, the course website, and their notebook within the first five minutes to avoid being marked tardy or absent.

  • Be prepared for class. Have your notebook, assignments, pen/pencil, and paper ready every day.

  • Have a good attitude about learning. Be prepared to actively participate. Accept feedback with a positive attitude.

  • Be respectful of others and their property.

  • Take care of the learning environment. Keep your area neat and clean. Always clean your space before leaving. Put materials away in their proper place.

  • Report any damaged equipment to the instructor immediately.

  • Do not change any settings on the computers.

  • Do not download or install any programs (including games) on school computers.

  • Do not access inappropriate content on the internet.


Academic Honesty Policy

Be in charge of your own learning. All submitted work — every line of code — must originate from your own mind.

  • Students may work with a peer and discuss general problem-solving strategies, ideas, and algorithms. However, all code must be your own. Every line of code must originate from your own thinking.

  • AI & External Source Use

    • AI tools may be used for idea generation, debugging assistance, and understanding small parts of code — not to generate complete solutions.

    • - If you use any external source (websites, LLM/AI tools, friends), cite it in your code comments — indicate where you got help and whether any code sections came from that source.

    • - Submitting AI-generated code as your own work — whether a whole solution or an unattributed snippet — is an academic integrity violation. Violations receive no credit and are referred for disciplinary action in accordance with school policy.

  • Team/group assignments must include every team member’s name in the block header comment. All other assignments require individual submission — work cannot be a copy of a peer’s submission. A submitted file bearing another student’s name but not your own will be treated as cheating and subject to the district’s plagiarism/cheating policy.


Electronic Devices

  • During instruction, assessment, classwork, discussions, and group collaboration, all personal electronic devices must be placed in a secure location where they will not be a distraction. Smartphones, tablets, and personal devices are not permitted without explicit instructor permission. Phones must be silenced or powered off.

  • No Meta smart glasses, AR glasses, or AI-enabled wearable devices are permitted in the classroom at any time. These devices can capture audio and video without visible indication, which violates the privacy of other students and the integrity of assessments.

  • CAMS provides Windows Laptops for student use. Personal Laptops are a privilege on our campus, not a right. Parent(s)/guardian(s) will be notified and conferences will be held if a student persists in using laptops for non-academic purposes.

  • Earphones, headphones, or other listening tools (excluding medically approved listening devices) should not be used during instruction or collaboration time.


Notes / Notebook

Each student is responsible for taking, organizing, and maintaining hand-written unit notes (Purpose of Note-Taking). Notes must be hand-written using the Cornell Notes method. Formatted Cornell Notes documents will be provided for each unit subsection. Additional pages will be provided as needed. Students are encouraged to keep their notebooks up-to-date and organized.

📒 Notes may be used on unit tests — current unit only. Notes count for 5% of your final grade.


Academic Support

  • Before school — 7:30 am – 8:30 am (please contact me prior to the date you need assistance — I may be meeting with another student or in a meeting)

  • After school — Tuesday – Thursday: 3:45 pm – 4:15 pm

  • Peer Tutoring — Monday through Friday, before and after school


Weighted Grading

Grades are posted online using Canvas. Grades are weighted and assigned as detailed below. Each item is scaled on a point system.

Grading Category

Percentage

Projects (IDP, Unit Capstone, Final Project)

50%

Tests / Quizzes

30%

Classwork / Portfolio

15%

Notes (hand-written Cornell Notes — current unit usable on tests)

5%


Grading Scale

All projects, presentations, tests, quizzes, classwork, portfolio, and notes will be used to calculate your final grade.

Grade Letter

Percentage

A

90% – 100%

B

80% – 89%

C

70% – 79%

D

60% – 69%

F

50% – 59%

M (Missing)

45%

Students who score below 75% on a project, test, or quiz (excluding finals) may retake for up to 75%. Students have one week to review feedback and schedule a retake before or after school.


Java Code Style Guide — CSA Java Grader


How your style score works

Your Documentation & Style score depends on how many different kinds of mistakes the grader finds, not how many times you make them. Ten lines missing a space after if count as one mistake type. Your feedback still lists every line, so you can fix them all.

Different mistake types

Style score

0

5

1

4

2–3

3

4–5

2

6 or more

1

The header comment at the top of your file is never style-checked. It is graded separately (see the next section).

The header

Every program starts with a header comment that has six filled-in fields. A missing header, or any blank field, costs 1 point off your final score.

// Name:          Jordan Smith
// Partner:       None
// Course:        AP Computer Science A
// Instructor:    Mr. V
// Assignment:    1.04.2 — Average Test Score
// Due Date:      October 14, 2026
import java.util.Scanner;
  • Any comment style works: // lines, /* ... */, or /** ... */.

  • Put it at the very top, above import. A header below the imports still counts, but your feedback will ask you to move it.

  • No partner? Write None or N/A. Don’t leave it empty.

  • Replace every template placeholder. [Your Full Name] or [Month Day, Year] counts as blank.

  • Use the label, a colon, then the value, e.g. Due Date: October 14, 2026. In your main file, the first comment with these labels is the one graded.

The 12 conventions the grader checks

These come from Oracle’s Java code conventions. Each one below is one mistake type.

Naming

1. Class names are PascalCase. Every word starts with a capital letter.

public class magic_8_ball { }   // wrong
public class MagicEightBall { } // right

2. Method names are camelCase. First word lowercase, later words capitalized.

public static double CalculateTime() { }  // wrong
public static double calculateTime() { }  // right

3. Variable names are camelCase. No underscores and no capital first letter.

double Total_Sales = 0;   // wrong
double totalSales = 0;    // right

4. Constants are UPPER_CASE. Any static final value uses capitals and underscores.

static final int maxSpeed = 100;   // wrong
static final int MAX_SPEED = 100;  // right

5. Names are meaningful, not single letters. A loop counter inside a for (...) is fine, and so are i, j, k, x, y, n and e.

double a = scanner.nextDouble();          // wrong
double firstScore = scanner.nextDouble(); // right

Layout

6. Code inside { } is indented one level deeper than the line that opened the braces.

public static void main(String[] args) {
System.out.println("Hi");       // wrong
    System.out.println("Hi");   // right
}

7. Don’t mix tabs and spaces for indentation in the same file. Pick one; 4 spaces is standard.

8. Keep lines to 100 characters or fewer. Split a long printf across two lines.

System.out.printf("Total items: %d, Total sales: $%.2f%n",
        items, sales);

9. One statement per line. The semicolons inside a for (...) header don’t count.

int burgers = 10; int fries = 4;   // wrong
int burgers = 10;                  // right
int fries = 4;

Braces and spacing

10. Always use { } braces on if, else, for and while, even for one line.

if (score > 90) grade = 'A';       // wrong

if (score > 90) {                  // right
    grade = 'A';
}

11. Put a space after if, for, while, switch and catch.

if(score > 90) {    // wrong
if (score > 90) {   // right

Comments

12. Explain your steps with comments. Programs with 10 or more lines of code need at least 1 comment line for every 15 lines of code. The header doesn’t count toward this; comments inside your code do.

double average = sum / 4;   // mean of the four scores

Test cases

Turn in your test cases one of two ways. Missing test cases caps your score at 4.

  1. A separate file: a document or screenshot (PDF, Word, PNG, JPG, TXT).

  2. A comment at the bottom of your program, with each case labeled TEST CASE 1:, TEST CASE 2:, and so on.

}   // end of class

/**
 * TEST CASE 1:
 * Input: 95, 87.5, 73.2, 75
 * Expected: Average test score: 82.68%
 * Actual: Average test score: 82.68%   PASS
 *
 * TEST CASE 2:
 * Input: 100, 100, 100, 100
 * Expected: Average test score: 100.00%
 * Actual: Average test score: 100.00%  PASS
 */
  • The number and colon matter: write TEST CASE 1:, not just “Test 1”. Capital letters are suggested but not required.

  • Number each case differently. Writing TEST CASE 1: three times counts as one case.

  • It must be a comment. Printing “TEST CASE 1” with System.out.println doesn’t count.

  • A comment after the class’s closing } is legal Java and compiles fine.

Before you submit

  • Header at the top with all six fields filled in (None or N/A for no partner)

  • Class, method and variable names follow the naming rules

  • Every { } body indented 4 spaces, with no tabs mixed in

  • Braces on every if, else, for and while, and a space after the keyword

  • One statement per line, and no line longer than 100 characters

  • Comments explaining the main steps

  • Output matches the assignment, including symbols like $ and %

  • Test cases turned in as a file or as TEST CASE comments

Common questions

  • My program works. Why did it lose points? The grader types the sample inputs from the assignment and compares your output. A missing $, the wrong number of decimal places, or an extra calculation counts as a failed check even when the program runs.

  • Why does var give a compile error? The grader compiles with Java 8, which doesn’t have var. Declare the type, e.g. double total.

  • Can I use float instead of double? It works for most programs, but a decimal number like 4.99 is a double, so float price = 4.99; won’t compile. Use double unless the assignment says otherwise.

  • My program got stuck and was marked as an infinite loop. Each run is stopped after 8 seconds. Check that your loops can end and that you read exactly the inputs the assignment asks for.

  • I resubmitted and Canvas renamed my file. That’s fine. The grader renames Main-1.java back to Main.java before compiling.

  • I think the grader got it wrong. Your teacher reviews every score and can change it. Bring your feedback and point to the line in question.


Classroom Attendance, Conduct, and Participation

It is crucial that students consistently attend class. Most classes consist of hands-on coding activities, pair programming, and projects that cannot be replicated outside of class time. Consistent attendance directly affects understanding and overall performance.

⚠️ Note on Participation: Participation is a critical component of learning. While it cannot be recorded as a formal grade per district policy, attendance, conduct, and active engagement are tracked and reflected in overall classroom standing.

Conduct Tracking (Additive Scale)

Infractions (Tardies, Sleeping, Gaming, Doing Other Classes’ Work)

Rating

0–5

Excellent (E)

6–10

Satisfactory (S)

11–15

Needs Improvement (N)

16+

Unsatisfactory (U)


Make-Up & Late Work Policy

📌 Planned Absences: If a student will not be present on the day an assignment is due, they must contact the teacher at least 2 days before the absence(s). Failure to notify the instructor in advance does not exempt a student from the assignment or late work penalty.

  • Students are responsible for all makeup work when absent. Refer to the district policy regarding makeup work timelines.

  • To make up a quiz or test, it is the student’s responsibility to contact the instructor within two school days of returning to set an agreed-upon date and time. Makeups and retakes are done before or after school only.

  • Handouts will be placed in a makeup folder labeled with the student’s name. It is the student’s responsibility to check this folder when returning before consulting the instructor.

  • Late work: Most work is done in class, so the late work policy is not applicable. For any assigned homework assignment, you have 1 week after the given due date to turn it in. Otherwise, you will receive a maximum of 50% for late work. With regards to Projects, you will have daily progress checks that will count for your overall grade. Failure to complete a daily progress check will lower your grade.


Assignment Header & Submission Requirements

Required Block Comment Header

All submitted .java files and test case documents must include the following header. This mirrors the block comment required in Main.java and follows the standard used by university CS departments.

⚠️ Submissions missing the header will be penalized one point.

/**
 * Name:          [Your Full Name]
 * Partner:       [Partner's Full Name, or "None"]
 * Course:        AP Computer Science A
 * Instructor:    [Instructor Name]
 * Assignment:    [Assignment Number — Assignment Title]
 * Due Date:      [Month Day, Year]
 */

Example:

/**
 * Name:          Jordan Smith
 * Partner:       Alex Rivera
 * Course:        AP Computer Science A
 * Instructor:    [Instructor Name]
 * Assignment:    1.3.1 — Calculate Your Weight on Jupiter
 * Due Date:      September 12, 2026
 */

Submission Requirements

All assignments require the following unless otherwise stated:

  • All .java source file(s)

  • Test Cases document showing: inputs, expected output, actual output, and Pass/Fail result — with the assignment header at the top

Projects will have their own dedicated rubric and submission instructions posted on Canvas.

5-Point Assignment Rubric

Points

Grade

Compilation & Output

Documentation & Style

Submission

5

Full Credit

Program compiles and runs without errors or warnings. Output matches expected results for all test cases.

Block comment header fully completed. Meaningful variable names, camelCase convention, proper indentation. Inline and multi-line comments present throughout.

All required .java files and test cases submitted with completed assignment header.

4

Near Full Credit

Program compiles and runs. Output is correct for most test cases with one minor error or omission.

Block comment header complete. Comments mostly present. Minor style or formatting inconsistency.

All required files submitted. Assignment header present.

3

Partial Credit

Program compiles but produces incorrect output for some test cases, or compiles with warnings.

Limited comments. Block comment header partially completed. Variable names or formatting inconsistent.

Most required files submitted. Test cases incomplete or partially documented.

2

Minimal Credit

Program has syntax or logic errors that cause significant incorrect output, or fails to fully compile.

Little to no commenting. Block comment header missing or blank. Poor variable naming or formatting.

A required .java file or test cases document is missing. Assignment header absent.

1

Attempted

Code submitted shows a clear attempt but does not compile or run.

Minimal or no documentation present.

At least one file submitted, but submission is largely incomplete.

0

No Credit

Nothing submitted, file is empty, or code is unrelated to the assignment.

N/A

N/A


Note-Taking in Learning

==Do you have the PowerPoint, video, textbook, and website — do you still need to take notes?==

Despite the vast amount of information available in electronic formats, taking notes is an important learning strategy. By considering your note-taking strategies carefully, you will be able to create notes that help you retain the most important concepts and assist in exam preparation.

Two Purposes for Taking Notes

  1. External storage — keeping a record of information heard or read.

  2. Facilitating learning — actively processing and organizing content while studying.

The availability of information online may reduce the importance of external storage. However, by neglecting to take notes, ==you lose the benefits of note-taking as a learning tool==.

How Note-Taking Supports Learning

Taking notes during class supports your learning in several important ways:

  1. Helps you focus attention and avoid distractions.

  2. Engages your mind in identifying and organizing main ideas — active learning rather than passive listening.

  3. Creates a condensed, well-organized record that is more efficient to review than re-reading longer texts.

Note-Taking Methods

Method

Description

When to Use

Lists

Sequential listing of ideas as presented. May be short phrases or full paragraphs.

Fallback method; tends to require a lot of writing and makes prioritization difficult.

Outlines

Most important ideas along the left margin (Roman numerals), supporting ideas indented (letters).

When material is well-organized. Easy to use on a laptop.

Concept Maps

Central idea in the center; branches for new ideas; arrows to connect concepts.

When showing relationships among ideas; good for instructors who move between topics.

Cornell Method ✓ Required

Two-column approach: narrow cue column (left 1/3), notes column (right 2/3), summary footer.

Recommended by most universities. Works for all subject types. Excellent for exam review.

The Cornell Method

The Cornell method was developed in the 1950s by Professor Walter Pauk at Cornell University. It is recommended by most universities for its usefulness and flexibility.

Four components:

Component

Description

Header

Course name and date at the top of each page.

Notes column (right, 2/3 of page)

Capture notes during class using any method — lists, outlines, or diagrams.

Cue column (left, 1/3 of page)

Main ideas, keywords, and questions — filled in during and after class.

Summary (footer)

A 2–3 sentence summary of the class in your own words — written after class.

“I used to tape my lecture classes so I could fill in my sketchy notes afterwards. Now that I’m using the Cornell system, my notes are complete and organized in much less time.”
— A student at Southern Methodist University

==Reviewing your notes as soon as possible after class is the most important step in making note-taking work.==

General Tips on Note-Taking

  1. Be prepared — have your materials (notebook, pens) ready before class.

  2. Write on only one side of the paper to allow integration with reading notes.

  3. Label, number, and date all notes at the top of each page.

  4. Don’t try to capture everything — listen for big ideas, keywords, and instructor emphasis cues.

  5. Copy anything written on the board — it is likely to be important.

  6. Leave space between ideas so you can add detail later.

  7. Use abbreviations — be consistent so you can decode them when reviewing.

  8. Create a symbol to mark when you fall behind (return and fill in with help from a peer or the instructor).

  9. ==Review your notes the same day — this is the single most effective habit for retention.==

  10. Write a summary of the main ideas in your own words after each class.

What If You Miss Class?

  • Never ask: “Did I miss anything important?”

  • If notes or slides are posted online — take notes on them.

  • Borrow a classmate’s notes — photocopy them, then annotate with your own questions and connections. Do not just copy and insert.

  • Schedule a study session with the classmate who provided notes.

  • If no notes are available, use the syllabus to identify what was covered and write a short summary using course readings and reliable sources.


Java Style Guidelines

Consistent, readable code is a professional standard and a grading requirement in this course. All submitted code must follow these Java style conventions.

Java Style Guidelines — Oracle Code Conventions

Consistent, readable code is a professional standard and a grading requirement in this course. Our style rules come from Oracle’s Code Conventions for the Java Programming Language, the original style guide for Java. Most companies’ Java style guides (Google’s, for example) are built on these same rules.

A few rules are course rules: they go a little further than Oracle so your code is easy to grade and easy for a partner to read. Each rule below is marked Oracle or Course.

The CSA Java Grader checks most of these rules automatically, and your teacher checks the rest when reading your code. Each type of mistake counts once in the Documentation & Style column, but your correction sheet lists every line, and you fix them all.

Mistake types

Documentation & Style score

0

5

1

4

2–3

3

4–5

2

6 or more

1

Naming Conventions

Element

Convention

Example

Source

Classes

PascalCase: a noun, every word capitalized

BankAccount, CashierTotals

Oracle §9

Methods

camelCase: a verb, starts lowercase

calculateAverage(), printResult()

Oracle §9

Variables

camelCase: starts lowercase

studentScore, totalSales

Oracle §9

Parameters

camelCase

numStudents, inputValue

Oracle §9

Constants (static final)

ALL_CAPS_WITH_UNDERSCORES

MAX_SPEED, TAX_RATE

Oracle §9

  • Meaningful names. Avoid one-letter names except for short “throwaway” variables such as loop counters (i, j, k). (Oracle §9)

  • The class name must match the file name. public class CashierTotals goes in CashierTotals.java. (Java requires this.)

  • No underscores or spaces in class, method, or variable names. Total_Sales and cashier_totals are wrong; totalSales and CashierTotals are right.

Example: fixing names
// Before
public class cashier_totals {
    double Total_Sales;
    public static void PrintReceipt() { }
}

// After
public class CashierTotals {
    double totalSales;
    public static void printReceipt() { }
}

Statements and Formatting

Rule

Example

Source

Always use braces { } on if, else, for, and while, even when the body is one line

if (score > 90) { … }

Oracle §7.4

One statement per line

count++; and total += price; go on separate lines

Oracle §7.1

Space after a keyword followed by (: if (, for (, while (, switch (, catch (

if (x > 0), not if(x > 0)

Oracle §8.2

No space after a method name

calculateAverage(a, b), not calculateAverage (a, b)

Oracle §8.2

Indent 4 spaces for each level inside { }

see the example below

Oracle §4

Spaces only, no tabs. Don’t mix tabs and spaces

set your editor to “insert spaces”

Course

Lines 100 characters or shorter. Oracle says 80; we allow 100 for long printf lines

split a long line after a comma or before an operator

Course (Oracle §4.1 says 80)

Opening brace at the end of the line; closing brace on its own line

public static void main(String[] args) {

Oracle §6.4

One blank line between methods

Oracle §8.1

Example: braces, one statement per line, and spacing
// Before: no braces, two statements on one line, no space after if
if(total > 50) discount = 5.0;
count++; total += price;

// After
if (total > 50) {
    discount = 5.0;
}
count++;
total += price;

Why always use braces? Without them, only the first line belongs to the if. Adding a second line later looks right but runs every time:

if (total > 50)
    discount = 5.0;
    System.out.println("You saved $5!");   // runs even when total is 10

Comments

Rule

Source

Block comment header at the top of your main .java file, with every field filled in (see Assignment Header & Submission Requirements). A missing or incomplete header costs 1 point.

Course

Comments explain the steps of your program: what each section does, and why for anything that isn’t obvious.

Oracle §5

About 1 comment line for every 15 lines of code. Your header doesn’t count toward this.

Course

Every method gets a short comment describing its purpose.

Course

Single-line comments use //; multi-line comments use /* */; Javadoc comments use /** */.

Oracle §5

Why a comment minimum? Oracle also warns that a comment shouldn’t repeat what the code already says. count++; // add 1 to count is wasted space. A good comment tells the reader what a group of lines is for: // total sales = burgers sold x price. In this course you are learning to explain your thinking, so we ask for a steady minimum. Professional teams decide this for themselves.

Example: Well-Styled Code

/**
 * Name:          Jordan Smith
 * Partner:       None
 * Course:        AP Computer Science A
 * Instructor:    [Instructor Name]
 * Assignment:    1.03.1 — Calculate Your Weight on Jupiter
 * Due Date:      September 12, 2026
 */
public class WeightOnJupiter {

    // Jupiter's gravity is 2.34 times Earth's gravity
    public static final double JUPITER_GRAVITY = 2.34;

    public static void main(String[] args) {

        // Earth weight in pounds
        double earthWeight = 150.0;

        // Calculate weight on Jupiter using proportional gravity
        double jupiterWeight = earthWeight * JUPITER_GRAVITY;

        // Warn about heavy loads; braces even for a one-line body
        if (jupiterWeight > 300) {
            System.out.println("Careful: that's a heavy load!");
        }

        System.out.printf("Weight on Jupiter: %.2f lbs%n", jupiterWeight);

    } // end main

} // end class WeightOnJupiter

Style Checklist (before you submit)

  • Header at the top, every field filled in (no partner → None)

  • Class name is PascalCase and matches the file name

  • Methods and variables are camelCase; constants are ALL_CAPS

  • Braces { } on every if, else, for, and while

  • One statement per line; a space after if, for, and while

  • Indented 4 spaces per level, no tabs, no line over 100 characters

  • Comments explain each step (about 1 per 15 lines of code)


AP Computational Thinking Practices: Skills

Practice 1: Program Design and Algorithm Development

1.A

Determine an appropriate program design to solve a problem or accomplish a task (not assessed)

1.B

Determine code that would be used to complete code segments

1.C

Determine code that would be used to interact with completed program code

Practice 2: Code Logic

2.A

Apply the meaning of specific operators

2.B

Determine the result or output based on statement execution order in a code segment without method calls (other than output)

2.C

Determine the result or output based on the statement execution order in a code segment containing method calls

2.D

Determine the number of times a code segment will execute

Practice 3: Code Implementation

3.A

Write program code to create objects of a class and call methods

3.B

Write program code to design a new type by creating a class

3.C

Write program code to satisfy method specifications using expressions, conditional statements, and iterative statements

3.D

Write program code to create, traverse, and manipulate elements in 1D array or ArrayList objects

3.E

Write program code to create, traverse, and manipulate elements in 2D array objects

Practice 4: Code Testing

4.A

Use test cases to find errors or validate results

4.B

Identify errors in program code

4.C

Determine if two or more code segments yield equivalent results

Practice 5: Documentation

5.A

Describe the behavior of a given segment of program code

5.B

Explain why a code segment will not compile or work as intended

5.C

Explain how the result of program code changes given a change to the initial code

5.D

Describe the initial conditions that must be met for a program segment to work as intended


AP CSA Vocabulary

Below is a comprehensive list of vocabulary words every AP Computer Science A student should know.

Missing a word? Please let me know…

Term

Definition

Algorithm

A step-by-step process for solving a problem or accomplishing a task.

Autoboxing

Automatic conversion of a primitive type to its corresponding wrapper class (e.g., int → Integer).

Boolean

A data type that holds one of two values: true or false.

Cast

Explicitly converting a value from one data type to another (e.g., (int) 3.7 → 3).

Class

A blueprint or template that defines the data (fields) and behavior (methods) for objects.

Compilation Error

An error detected by the Java compiler before the program runs (syntax errors, type mismatches).

Compound Assignment Operator

An operator that combines arithmetic with assignment (e.g., +=, -=, *=, /=).

Constructor

A special method used to initialize a new object. Has the same name as the class and no return type.

Data Type

Specifies the kind of data a variable can hold (e.g., int, double, boolean, String).

De Morgan’s Law

Rules for negating compound Boolean expressions: !(A && B) equals `!A

Encapsulation

Bundling data (fields) and methods that operate on that data within a class; restricting direct access to fields using private.

Enhanced for Loop

A simplified loop for traversing arrays or ArrayLists: for (Type item : collection).

Exception

A runtime error that disrupts normal program flow (e.g., ArrayIndexOutOfBoundsException, NullPointerException).

Field (Instance Variable)

A variable declared inside a class but outside any method; each object has its own copy.

Index

The position of an element in an array or ArrayList, starting at 0.

Inheritance

(Removed from 2025-26 AP CSA curriculum) A mechanism where one class acquires the fields and methods of another.

Instance

A specific object created from a class.

Instantiation

The process of creating an object using the new keyword.

Integer Division

Division between two integers that discards the decimal remainder (e.g., 7 / 2 = 3).

Interface

(Oracle 1Z0-811) A reference type containing only abstract methods and constants; defines a contract for implementing classes.

Iteration

The process of repeating a block of code using loops (while, for, enhanced for).

Local Variable

A variable declared inside a method; only accessible within that method.

Logic Error

An error where the program runs but produces incorrect output due to flawed reasoning.

Method

A named block of code that performs a specific task and can be called repeatedly.

Method Overloading

Defining multiple methods with the same name but different parameter lists within the same class.

Modular Arithmetic

Using the % operator to find the remainder of division (e.g., 10 % 3 = 1).

Mutator Method (Setter)

A method that modifies the value of a private field (e.g., setName()).

Accessor Method (Getter)

A method that returns the value of a private field (e.g., getName()).

null

A special value indicating that a reference variable does not point to any object.

Object

An instance of a class, containing its own data (fields) and behaviors (methods).

Off-by-One Error

A logic error caused by incorrect loop bounds, often accessing index 0 when 1 is intended, or vice versa.

Operator Precedence

The order in which operators are evaluated in an expression (e.g., * and / before + and -).

Parameter

A variable in a method declaration that receives a value when the method is called.

Polymorphism

(Oracle 1Z0-811) The ability of different objects to respond to the same method call in different ways.

Primitive Type

A basic data type built into Java: int, double, boolean, char, long, float, short, byte.

Private

An access modifier restricting a field or method to use only within its own class.

Public

An access modifier allowing a field or method to be accessed from any class.

Reference Type

Any non-primitive data type — objects, arrays, Strings — stored as a memory reference, not a direct value.

Return Type

The data type of the value a method returns; void if it returns nothing.

Runtime Error

An error that occurs while the program is running (e.g., dividing by zero, null pointer dereference).

Scope

The region of code where a variable is accessible — determined by where it is declared.

Sequential Search (Linear Search)

Checking each element of an array/ArrayList one by one until the target is found.

Static

A modifier indicating that a field or method belongs to the class itself, not to any individual instance.

Static Method

A method that can be called using the class name without creating an object (e.g., Math.sqrt()).

String

A sequence of characters, treated as an object in Java. Immutable — cannot be changed after creation.

Subclass

(Oracle 1Z0-811) A class that inherits from another class using extends.

Superclass

(Oracle 1Z0-811) A class whose properties are inherited by a subclass.

this keyword

A reference to the current object within a method or constructor.

Traversal

Visiting each element in an array or ArrayList, typically using a loop.

Unboxing

Automatic conversion of a wrapper class object to its corresponding primitive type.

Variable

A named storage location in memory that holds a value of a specific data type.

Void

A return type indicating a method does not return any value.

Wrapper Class

An object version of a primitive type: Integer, Double, Boolean. Provides useful methods like Integer.parseInt().