Course Contents — Links to Lessons

Grade 12 Notes

Unit 0: HTML, CSS

Binary and Hexadecimal notes

Unit 1: Introduction to Java and its syntax

Objectives for Unit 1 Read this checklist and make sure that you know it for the quiz.

Unit 2: Flow control

While programs (v1)
While programs (v2)

Unit 3: Methods, Arrays, and Strings

Unit 4: Graphics using HSA2

A simple way to have popup input and messages is JOptionPane. Please have a look at the document and see how to use them.
In HSA2 we use simpler form gc.showDialog() and gs.showInputDialog()

We are going to be using a graphics library, called HSA2, that removes a lot of the complexity of Swing graphics.
We'll learn Swing graphics in grade 12 programming.
You can find the latest HSA2 package on my GitHub . Download the zip file at home.

Step 1: Learn The Graphics Commands


Step 2: Basic Animation

Read this overview of game loops first.

In this step we'll learn how to make a program with something changing on the screen. We'll be using a while loop to do this continually.

First look at the PDF that explains the "" program.

This shows

Useful things

(1) HSA2 overview notes
(2) How to do useful things in HSA2

How to make an intro screen in HSA2

Step 3: Understanding Movement

Notes on motion and bouncing

Step 4: Using Objects for Animation

These are almost always either rectangles (e.g. Rectangle paddle = new Rectangle (300,650,100,10); ← this would be for a paddle in Pong or Breakout)
or an object the extends Rectangle. (e.g. Class Ball extends Rectangle { }

The reasons for doing this are (i) all of the variables that control the position and speed of the shape drawn on the screen can be hidden inside the object,
(ii) rectangles have a simple intersect method. Though it's not entirely accurate if you have two balls hitting diagonally.

Look at the PDF that explains the "" program.

OOPS: I have to add more notes about this. There is a video that explains this though.

Step 5: Keyboard and Mouse Input

Step 6: Timers

How to use Timers and Booleans Sample program: Timer showing seconds on screen and pause functionality

Images and Sound is here

Videos about graphics

Go to the Salamander2 youtube channel

The videos discuss how to make ball objects instead of just a bunch of variables, how to make things collide and bounce, how to make arrays and arraylists of balls, how to add and delete balls.

Unit 5: ISP/Final project

Board Games that can be made after we've learned how to program TicTacToe