‹ All courses

AP Computer Science A

A free AP Computer Science A curriculum in Java, with slides, labs, and game projects.

1,244 interactive problems.

New: Teachers can now log in, enroll their students, and assign problem sets that follow the new 2025 CSA curriculum. Live coding problems and a full Java IDE are included.

This is a resource for teachers and students for AP Computer Science A and has recently been updated. This curriculum follows the newly revised 2025 College Board curriculum, which consists of 4 units. In addition, the emphasis is to help students learn how to code 2D arcade games using Processing. In particular, students will work on writing a full platformer game like Super Mario from scratch.

Lecture Notes

The following powerpoint lecture slides are adapted from the book Building Java Programs: A Back to Basics Approach by Stuart Reges and Marty Stepp as well as the Runestone's CS Awesome curriculum.

Unit 1: Using Objects and Methods

Unit 2: Selection and Iteration

(*Optional*)Computer Animation with Processing

Introduction to Processing LabZIP — Introduction to Processing Lab
Bouncing Ball LabZIP — Bouncing Ball Lab
Controlling an Image with the Keyboard LabZIP — Controlling an Image with the Keyboard Lab
Tank Collects Coins Lab(Processing)ZIP — Tank Collects Coins Lab(Processing)
Simple Platformer(Processing, requires Arraylists)ZIP — Simple Platformer(Processing, requires Arraylists)

Unit 3: Class Creation

Implementing the Sprite ClassZIP — Implementing the Sprite Class
Controlling a Sprite Using the KeyboardZIP — Controlling a Sprite Using the Keyboard

Unit 4: Data Collections

Largest Ball Object LabZIP — Largest Ball Object Lab
ArrayList Lab(Processing)ZIP — ArrayList Lab(Processing)
Tank Collects Coins Lab(Processing)ZIP — Tank Collects Coins Lab(Processing)
Connect-Four Lab(Processing)ZIP — Connect-Four Lab(Processing)
Fractal Circle Lab(Processing)ZIP — Fractal Circle Lab(Processing)
Sierspinski Triangle Lab(Processing)ZIP — Sierspinski Triangle Lab(Processing)

Preparing for the AP Exam

How to Write a Platformer Game in JavaHTML — How to Write a Platformer Game in Java

In this short video series course, we will learn how to write a platformer (or side-scrolling) game like Super Mario. We will write this game from scratch with very basic algebra without relying on any physics engine! Here's a short 2-minute preview of the game. The entire Youtube playlist for this curriculum can be found here. The webpage including labs for the curriculum is here.

Coding Challenges

A series of coding challenges. Most are mathematical in focus and require some trignometry. The distribution code is included and provides a template for completing the code. Processing is used for the animation challenges.

1.Ball Bounces Off AnglesHTML — Ball Bounces Off Angles

This animation challenge simulates a ball drop on an uneven ground. (Demo, Tutorial, Distribution Code) Solutions can be found here.

2.Inverse Kinematics: Pulling A StringHTML — Inverse Kinematics: Pulling A String

This animation challenge simulates pulling a string with the mouse. (Demo, Tutorial, Distribution Code)

3.Billiard Ball Collisions

This animation challenge simulates collisions of billiard balls in 2D. (Tutorial, Distribution Code) Solutions to the two-ball case and the many-ball case with the glitch fix.

Final Projects

Below are some of the most creative programming projects from my students at Boston Latin School. All are written in Java using the Processing IDE and ported to Javascript using ProcessingJS for the browser. I have only tested this on Google Chrome. Let me know if there are any errors. The basic requirements are that their programs are object-oriented with at least three or more objects and that inheritance and polymorphisms are used in a sensible way. Click on the project title to play.

Eel: 3D Snake Game by Adam Grant.Link — Eel: 3D Snake Game by Adam Grant.
Tetris by Jason Mar.Link — Tetris by Jason Mar.
Space Wars by Ricky Ciliberto.Link — Space Wars by Ricky Ciliberto.
Shooter by Ricky Ciliberto.Link — Shooter by Ricky Ciliberto.
Tiny Tanks by Ben Givertz.Link — Tiny Tanks by Ben Givertz.
Star Wars Galaga by Damon Prum.Link — Star Wars Galaga by Damon Prum.
Tron by Rachel Lee.Link — Tron by Rachel Lee.
Space Invaders by Kathy Mei.Link — Space Invaders by Kathy Mei.
Flippy Bird by John Mikulskis.Link — Flippy Bird by John Mikulskis.
Crazy Snakey by John Mikulskis.Link — Crazy Snakey by John Mikulskis.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.