β United States Computer Science
United States Β· College BoardSyllabus
Computer Science syllabus, dot point by dot point
Every dot point in the United States Computer Sciencesyllabus, with a focused answer for each one. Click any dot point for a worked explainer, past exam questions, and links to related dot points. Written by Claude Opus 4.8, Anthropic's latest AI.
Unit 1: Primitive Types
Module overview β- How does casting convert between int and double, and what is the range of an int?Topic 1.5 Casting and Ranges of Variables: use casting to convert between int and double, predict the effect of truncation, and recognize that an int has a finite range that can overflow.9 min answer β
- How do the compound assignment operators and the increment and decrement operators provide a shorthand for updating a variable?Topic 1.4 Compound Assignment Operators: use the compound assignment operators (+=, -=, *=, /=, %=) and the increment and decrement operators (++, --) as shorthand to update variables.8 min answer β
- How are arithmetic expressions evaluated in Java, and what does integer division and the modulo operator do?Topic 1.3 Expressions and Assignment Statements: evaluate arithmetic expressions using operator precedence, integer division and the modulo operator, and assign results to variables.10 min answer β
- What are the primitive types in Java, and how do you declare and initialise variables of each?Topic 1.2 Variables and Data Types: identify the primitive types int, double and boolean, and declare, initialise and use variables of those types.9 min answer β
- What is a program, how does Java run it, and why does the order of statements matter?Topic 1.1 Why Programming? Why Java?: explain how a program is a sequence of statements executed in order, how Java source is compiled and run, and how to display output and handle simple runtime behavior.9 min answer β
Unit 2: Using Objects
Module overview β- How does a non-void method return a value, and how do you use that returned value?Topic 2.5 Calling a Non-void Method: call a method that returns a value, and use the returned value by storing it, printing it, or including it in an expression.9 min answer β
- How do you pass arguments to a void method, and how do parameters and arguments correspond?Topic 2.4 Calling a Void Method with Parameters: call a void method that takes parameters, passing arguments that match the parameter list in number, order and type, and explain how arguments are copied to parameters.9 min answer β
- How do you call a void method on an object using dot notation, and what does void mean?Topic 2.3 Calling a Void Method: call a non-static void method on an object using dot notation, and explain that a void method performs an action but returns no value.8 min answer β
- How do you create an object with the new keyword and a constructor, and store it in a reference variable?Topic 2.2 Creating and Storing Objects (Instantiation): use the new keyword to call a constructor and instantiate an object, choosing the correct constructor by its parameters, and store the result in a reference variable.9 min answer β
- What is the relationship between a class and an object, and what does it mean to say an object is an instance of a class?Topic 2.1 Objects: Instances of Classes: explain the relationship between a class and its objects, and describe an object as an instance of a class with state and behavior.8 min answer β
- How are String objects created and joined, and what does string concatenation do with different operand types?Topic 2.6 String Objects: Concatenation, Literals, and More: create String objects from literals or a constructor, concatenate strings with the + operator, and predict the result of mixing strings with numbers and escape sequences.9 min answer β
- Which String methods does AP CSA require, and how do length, substring, indexOf, equals and compareTo behave?Topic 2.7 String Methods: call the String methods in the AP Java subset (length, substring, indexOf, equals, compareTo), respecting zero-based indexing and the immutability of String objects.11 min answer β
- Which Math class methods does AP CSA require, and how do you generate a random number in a chosen range?Topic 2.9 Using the Math Class: call the static Math methods in the AP Java subset (abs, pow, sqrt, random) and generate a random integer or double in a specified range.10 min answer β
- What are the Integer and Double wrapper classes, and how do autoboxing, unboxing and their useful constants and methods work?Topic 2.8 Wrapper Classes: Integer and Double: use the Integer and Double wrapper classes, including autoboxing and unboxing, the MIN_VALUE and MAX_VALUE constants, and parsing methods.10 min answer β
Unit 3: Boolean Expressions and if Statements
Module overview β- How do relational operators build boolean expressions, and what value does each one produce?Topic 3.1 Boolean Expressions: evaluate expressions formed with the relational operators (<, >, <=, >=, ==, !=) that produce a boolean result of true or false.10 min answer β
- How do you compare objects in Java, and why does == differ from the equals method?Topic 3.7 Comparing Objects: compare object references with == and !=, compare object contents with equals, and detect a null reference, understanding the difference between identity and equality.10 min answer β
- How do the logical operators &&, || and ! combine conditions, and what is short-circuit evaluation?Topic 3.5 Compound Boolean Expressions: combine boolean expressions with the logical operators && (and), || (or) and ! (not), applying short-circuit evaluation.11 min answer β
- How does an else if chain select one outcome from several mutually exclusive options?Topic 3.4 else if Statements: use an if / else if / else chain so that the first true condition runs its block and the rest are skipped, selecting exactly one outcome.10 min answer β
- How do De Morgan's laws let you rewrite a negated boolean expression into an equivalent one?Topic 3.6 Equivalent Boolean Expressions: apply De Morgan's laws and truth tables to produce equivalent boolean expressions and to simplify negations of compound conditions.10 min answer β
- How does an if-else statement choose between two alternative blocks of code?Topic 3.3 if-else Statements: use a two-way if-else statement so that exactly one of two code blocks runs depending on whether the boolean condition is true or false.10 min answer β
- How does an if statement use a boolean condition to control which statements run?Topic 3.2 if Statements and Control Flow: use a one-way if statement so that a block of code runs only when its boolean condition is true, and trace the resulting flow of control.10 min answer β
Unit 4: Iteration
Module overview β- How do you traverse a String with a loop to count, search or transform its characters?Topic 4.3 Developing Algorithms Using Strings: traverse a String with a loop using length, substring and indexOf to implement standard algorithms such as counting characters, searching for a pattern and building a new String.11 min answer β
- How does a for loop package initialisation, condition and update into one header, and when do you use it?Topic 4.2 for Loops: use a for loop, whose header combines initialisation, a boolean condition and an update, to repeat a block a controlled number of times, and convert between for and while loops.11 min answer β
- How do you count how many times a statement executes in a loop, including nested loops?Topic 4.5 Informal Code Analysis: determine the number of times a statement executes in a loop or nested loop by counting iterations, without using formal big-O notation.10 min answer β
- How do nested loops work, and how do you count the total iterations of an inner loop inside an outer loop?Topic 4.4 Nested Iteration: write and trace nested loops, where an inner loop runs in full on each pass of an outer loop, and count the total number of inner-loop iterations.11 min answer β
- How does a while loop repeat a block of code, and how do you avoid an infinite loop?Topic 4.1 while Loops: use a while loop to repeat a block of statements while a boolean condition remains true, with correct initialisation, condition and update to avoid infinite or off-by-one loops.11 min answer β
Unit 5: Writing Classes
Module overview β- How does an accessor method return an object's data, and what is the toString method?Topic 5.4 Accessor Methods: write accessor (getter) methods, including a toString method, that return information about an object's state without changing it.10 min answer β
- What are the parts of a Java class, and how do instance variables, constructors and methods fit together?Topic 5.1 Anatomy of a Class: identify the parts of a class definition (the class header, private instance variables, constructors and methods) and explain encapsulation through access modifiers.10 min answer β
- How does a constructor initialise a new object's instance variables, and what happens if you omit one?Topic 5.2 Constructors: write constructors that initialise an object's instance variables from parameters, including overloaded and default constructors, and explain the default initial values.11 min answer β
- How do comments, preconditions and postconditions document a method's behavior?Topic 5.3 Documentation with Comments: write comments that document a method, including its precondition and postcondition, to describe what the method assumes and guarantees.10 min answer β
- What ethical and social responsibilities come with designing and using computing systems and data?Topic 5.10 Ethical and Social Implications of Computing Systems: explain the ethical and social responsibilities of programmers, including data privacy, intellectual property, system impact and responsible design.10 min answer β
- How does a mutator method change an object's state, and how can it validate the new value?Topic 5.5 Mutator Methods: write mutator (setter) methods, usually void, that change an object's instance variables, including methods that validate or constrain the new value before assigning it.10 min answer β
- What is the scope of a local variable, and how do public and private control access to members?Topic 5.8 Scope and Access: distinguish local variable scope from instance variable scope, and use the access modifiers public and private to control where a class member can be used.10 min answer β
- How do static variables and methods belong to the class rather than to individual objects?Topic 5.7 Static Variables and Methods: declare and use static variables and methods, which belong to the class as a whole rather than to any one object, and explain how they differ from instance members.11 min answer β
- What does the this keyword refer to, and when do you need it inside a method or constructor?Topic 5.9 this Keyword: use the implicit parameter this to refer to the current object, disambiguate an instance variable from a parameter of the same name, and pass the current object to another method.10 min answer β
- How do you design a method with parameters and a return value, and how does it use the object's own data?Topic 5.6 Writing Methods: design and implement methods that take parameters, perform a computation possibly using the object's instance variables, and return a result or perform an action.11 min answer β
Unit 6: Array
Module overview β- How do you create an array of a fixed size, and how do you read or change the element at a given index?Topic 6.1 Array Creation and Access: declare and initialise a one-dimensional array, access elements by index from 0 to length minus 1, and use the length attribute.11 min answer β
- What are the standard array algorithms - finding a sum, maximum, minimum, count or average - and how do you write them?Topic 6.4 Developing Algorithms Using Arrays: write and apply standard algorithms over a one-dimensional array, including finding minimum, maximum, sum, average, count and shifting or rearranging elements.12 min answer β
- When is the enhanced for loop the cleaner way to read every element of an array, and what can it not do?Topic 6.3 Enhanced for Loop for Arrays: use an enhanced for-each loop to traverse the elements of an array, and explain why it cannot modify the array or access indices.10 min answer β
- How do you visit every element of an array in order using a standard for loop driven by the index?Topic 6.2 Traversing Arrays: use a standard for loop with an index variable to traverse an array, reading or modifying each element, while staying inside the valid index bounds.11 min answer β