‹ All courses

AP Computer Science A

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

1,112 interactive problems, free to use.

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

1.Basic Java SyntaxPPTPDF
2.Variables and DatatypesPPTPDF
3.Arithmetic OperationsPPTPDF
4.User Input with Scanner (background, keyboard input is not assessed)PPTPDF
5.Methods: Signatures and CallingPPTPDF
6.Math ClassPPTPDF
7.Objects: Instances of ClassesPPTPDF
8.StringsPPTPDF

Unit 2: Selection and Iteration

1.Boolean Expressions and if-else-else if statementsPPTPDF
2.Compound Boolean Expressions and Comparing ObjectsPPTPDF
3.While LoopsPPTPDF
4.For LoopsPPTPDF
5.Nested Iteration and Informal Run-Time AnalysisPPTPDF

(*Optional*)Computer Animation with Processing

1.The BasicsPPTPDF
Introduction to Processing LabZIP
Bouncing Ball LabZIP
2.Working with ImagesPPTPDF
Controlling an Image with the Keyboard LabZIP
3.Collision DetectionPPTPDF
Tank Collects Coins Lab(Processing)ZIP
4.Simple Platformer Game(Mario)PPTPDF
Simple Platformer(Processing, requires Arraylists)ZIP

Unit 3: Class Creation

1.Abstraction and Program DesignPPTPDF
2.Impact of Program Design (incl. using AI to write code)PPTPDF
3.Anatomy of a Java ClassPPTPDF
Implementing the Sprite ClassZIP
Controlling a Sprite Using the KeyboardZIP
4.Writing MethodsPPTPDF
5.Variables, Scope and SemanticsPPTPDF

Unit 4: Data Collections

1.Ethical and Social Issues Around Data CollectionPPTPDF
2.Introduction to Using Data SetsPPTPDF
3.Introduction to ArraysPPTPDF
Largest Ball Object LabZIP
4.For Each and Array AlgorithmsPPTPDF
5.Using Text FilesPPTPDF
6.Wrapper ClassesPPTPDF
7.Introduction to ArrayListsPPTPDF
ArrayList Lab(Processing)ZIP
Tank Collects Coins Lab(Processing)ZIP
8.2D ArraysPPTPDF
Connect-Four Lab(Processing)ZIP
9.Searching and SortingPPTPDF
10.RecursionPPTPDF
Fractal Circle Lab(Processing)ZIP
Sierspinski Triangle Lab(Processing)ZIP

Preparing for the AP Exam

1.Preparation for the AP ExamPPTPDF

How to Write a Platformer Game in JavaHTML

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

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

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
Tetris by Jason Mar.Link
Space Wars by Ricky Ciliberto.Link
Shooter by Ricky Ciliberto.Link
Tiny Tanks by Ben Givertz.Link
Star Wars Galaga by Damon Prum.Link
Tron by Rachel Lee.Link
Space Invaders by Kathy Mei.Link
Flippy Bird by John Mikulskis.Link
Crazy Snakey by John Mikulskis.Link

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