The AP CSA exam is on Wednesday May 12, 2027 at 12:00 PM!
Time remaining:
About the Course
- Course Syllabus. Read all about this course, student expectations, and how you will be evaluated.
- AP Computer Science A Description. The official College Board information about this course.
- Code of Honour. All about how to collaborate without plagiarism in this course.
- About the AP Exam. Updated for 2026-27.
- Send me your GitHub username for handin!
- Students get the Java quick reference guide as a cheat sheet on the AP Exam.
Resources
- We are using the textbook Think Java 2nd Edition by Allen Downey and Chris Mayfield. You can download the pdf version, use the online version, or use the interactive version.
- Get your College Board account (instructions here!) and join us at AP Classroom. You can get the join code in class from me.
- Some additional free text books: CS Awesome (requires free account), Tokyo EdTech's Intro to Java
- Java Style Guide for this course.
Chapter 1. Computer Programming
Ch 1 introduces the fundamentals of computers and programming, covering what a computer is, and basic programming instructions like input, output, mathematical operations, decisions, and repetitions. It presents the "Hello World" program to explain Java classes, methods, statements, and comments. The chapter also distinguishes between high-level and low-level languages, detailing the compilation and interpretation process (javac, java, JVM, byte code). It discusses displaying multiple messages using print vs println, source code formatting, escape sequences, and introduces the broader field of computer science. Finally, it outlines the three types of programming errors: compile-time, run-time, and logic errors, and provides initial debugging advice.
Notes & Assignments:
- Chapter 1 Slides
- Chapter 1 from "Introduction to Programming Using Java" by David J. Eck is recommended for expanding upon the topic of "What is a computer."
- Notes about Compilers, Interpreters, and Java
- YouTube playlist of my explanation of Compilers, Interpreters, and Java
Chapter 2. Variables and Operators
This chapters delves into variables for storing values (numbers, text) and their declaration and assignment. It introduces memory diagrams to visualise how values are stored and changed. The chapter covers arithmetic operators (+, -, *, /, %) and introduces floating-point numbers (double), discussing rounding errors and string concatenation. It further explains compiler error messages, run-time errors, and logic errors, providing insights into their identification.
Notes & Assignments:
- Chapter 2 Slides
- Textbook Exercises: 2.2 (Date.java), 2.3 (Time.java). Assigned Sept 14th. π GitHub repository "ch2" π
- Ch2 reference solutions
Chapter 3. Input and Output
This chapters focuses on user interaction, explaining the System class (System.out, System.in) and the Scanner class for reading keyboard input. It details Java's language elements such as packages, classes, methods, statements, expressions, and tokens. The chapter covers literals and constants, formatting output with printf and format specifiers, and how to interpret error messages. It also introduces type cast operators and the remainder (modulo) operator, integrating these concepts into complete programs. We also deal with the "Scanner Bug," which is an annoying problem but easy to avoid if you know about it.
Notes & Assignments:
- Chapter 3 Slides
- Textbook Exercises: Assigned Sept 16th. π GitHub Repository "ch3" π
- 3.2: Temperature.java
- 3.3: ConvertTime.java
- 3.4: GuessMyNumber.java
- Ch3 reference solutions
Chapter 4. Methods and Testing
This chapter teaches how to organise programs into multiple methods. It differentiates between void methods (no return value) and value-returning methods, explaining return types and return statements. Concepts such as flow of execution, parameters and arguments, and multiple parameters are introduced. Stack diagrams are presented as a tool to visualise the scope of variables and method execution. The chapter also explores methods in the Math class and the principle of composition, concluding with a discussion on incremental development and the use of stubs and scaffolding for testing.
Notes & Assignments:
- Chapter 4 Slides
- Textbook Exercises: Assigned Sept 22nd. π GitHub repository "ch4" π
- 4.1: FormatDate.java
- 4.2-4.5 Do these on the paper provided. No need to submit to GitHub
- 4.6: Multadd.java
Chapter 5. Boolean Logic
This chapter introduces relational operators (==, !=, >, <, >=, <=) that produce boolean values (true/false). It covers conditional statements (if-else, if-else-if chains, nesting) for decision-making and the switch statement. The chapter explains logical operators (&&, ||, !), De Morgan's Laws, and the use of boolean variables and methods. A significant focus is placed on validating input and using System.err for error messages.
Notes & Assignments:
- Chapter 5 Slides
- Coding Bat: Make an account at codingbat.com
- Logic-1: First column only. Reference Solutions.
- Logic-2: First column only. Reference Solutions.
- Textbook Exercises: Assigned Oct 5th. π GitHub repository "ch5" π
- 5.1, 5.4, 5.5: Paper exercises
- 5.2: GuessMyNumber.java
- 5.3: Fermat.java
- 5.6: Quadratic.java
- 5.7: Triangle.java
- De Morgan's Law Assignment
- Check out additional practice questions on AP Classroom (MCQ 1.9, 1.10, 2.2-2.6 as well as Unit 2 Progress Check).