- Getting Started
- Homework
- LewTube
- Projects
- GridWorld
- Test Info
Welcome to AP Computer Science! Below are some key documents and instructions for installing BlueJ.
1. Syllabus | Planner | Quick Reference
Syllabus (updated 15 Aug 11)
Spring 2012 Planner (updated 21 Jan 12)
APCS Quick Reference w/ GridWorld (updated: 09 Nov 11)
The Complete Java 7 API (updated: 15 Aug 11)
2. How do I get Java up and running on my system?
If you have a Mac, you already have Java installed on your system, so you do not need to install Java. You can skip to step 2 below. If you have a Windows system you will need to install the Java SDK. See the LewTube video on how to install Java on your system (this is for PCs only. This step does not need to be done if you have a Mac, Java is already installed on your system)
- Step 1: Go to the BlueJ website and download the Java JDK 6 (Java Development Kit). Save it to your computer, then run the installation program. Installing the JDK will intall the Java "compiler" and other useful tools. Remember, this is only needed if you are running a Windows system.
- Step 2: Go back to BlueJ and download the version of BlueJ for your system (Windows or Mac). Run the installation program and you are ready to go!
3. How do I create a project, java file, compile, and run a program?
Below are the steps to create, compile, run a Java program in BlueJ. Also, see LewTube for videos that demonstrate this process.
- Click File | New Project. Type the name of the project. A project will keep all of your .java file(s) together for easy management.
- Click "New Class" in the BlueJ window. Type the name of the file (BlueJ will add the required .java extension automatically).
- Click on a "Class Type". The simple "Class" is sufficient to start.
- Click OK to save the file.
- Double click on the icon for the class that you just created.
- Type in the source code for you Java program.
- Press "Compile" (or press Apple-K) to compile your file(s).
- Close window that holds your java program
- Right click on the file that contains "main" and click on "void main(String [] args)"
- Click OK to run program!
1. Homework Assignments
"Do things as simple as possible, but no simpler"
- Albert Einstein
| Chapter | Learning Objectives | Java Source Code (zipped) |
Homework (RQs and Programs) |
|---|---|---|---|
| Ch 1 - "Breaking the Surface" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 2 - "Welcome to Objectville" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 3 - "Know Your Variables" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 4 - "How Objects Behave" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 5 - "Extra-Strength Methods" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 6 - "Using the Java Library" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 7 - "Better Living in Objectville" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 8 - "Serious Polymorphism" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 9 - "Life and Death of an Object" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 10 - "Numbers Matter" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 11 - "Risky Behavior" | LO | Code examples |
Homework (.pdf) Homework (.doc) |
| Ch 12 - "A Very Graphic Story" | Code examples | ||
| Ch 13 - "Work on Your Swing" | "BeatBox.java" is here! | Code examples | |
| Ch 14 - "Saving Objects" | Code examples | ||
| Ch 15 - "Make a Connection" | Code examples | ||
| Ch 16 - "Data Structures" | Code examples | ||
| Ch 17 - "Release Your Code" | Code examples | ||
| Ch 18 - "Distributed Computing" | Code examples | ||
| Barron's Ch 7 - "Recursion" |
Homework (.pdf) Homework (.doc) |
2. Variable / Method / Class naming rules
- Always begin with a letter
- Use a-z, A-Z, 0-9 ONLY (no underscores)
- Use camelNotation for variable and method names
- Use "final" whenever possible
- Use MEANINGFUL NAMES!!
- Begin class names with a capital letter with CamelNotation
- Brace spacing and indentation - ALL THE TIME with if, for, while statements
- ( Parenthesis spacing ) all the time!
- Use spacing liberally…memory is CHEAP!
3. Commenting rules
-
Comment end curly brace of classes, methods, loops( while, for), and if statements
while( ... )
{
} // end while loop -
Comment purpose of methods using Javadocs with @param and @return
Javadoc comments - Comment purpose of loops (while, for)
- Comment purpose of if-else statements
4. Ten Effective Study Habits (and six not so good ones...)
| Videos | Topics |
|---|---|
| Getting started |
- Installing BlueJ - Running BlueJ - Changing BlueJ Tabs |
| Loops |
- for - for each |
| Arrays and ArrayLists |
- 1D Array - 2D Array - ArrayLists |
Object Methods |
- toString() - toString() calling toString() - .equals() - "==" vs. ".equals()" |
| Constructors | Constructors |
| Inheritance |
- Pets (extends, this, super() and super.method() ) - Comparable interface |
| GridWorld |
- Getting started with GridWorld - Creating a "SpiderCritter" - Inheriting from Actors, Bugs, and Critters - Modifying GridWorld: "Autostarting" GridWorld |
| Projects 2012 |
- MetroidSmash - Burgertime - 3D Tic Tac Toe - LaserCheckers - PacMan - TowerDefense - Fishing - Archers - Miller - FallingChickens - BomberMan - Stratego - Sorry! - ThirtyOne - Backgammon - Parachuting - FinalFantasy - Tetris - GrandTurismo - Galaga |
| Projects 2011 |
- Dots - Breakout - NumberMunchers - Connect Four - AstroBob - Space Invaders - AntSim - Missle Command - Tron - Lewdicrous Adventures - Video Poker - Biplanes - Monopoly - Pokemon - Football |
| Projects 2003-2010 |
- Pool - Othello - Mastermind - JavaHouse - Amazon - Asteroids - Mario - ATC - Soy |
Here is the long-term APCS Project Assignment for the Fall Semester
Fall Project I (updated 05 Nov 10)
Fall Project I Rubric (updated 05 Nov 10)
UML Template (.xls) (updated 05 Nov 10)
Project Presentation Peer Evaluation Form (updated: 05 Nov 10)
Project Presentation Self Evaluation Form (pdf) (updated: 02 Feb 11)
Project Presentation Self Evaluation Form (doc) (updated: 02 Feb 11)
The "javadoc" commenting convention
Java Game Tutorial - Graphics and Animation
Spring Semester Post AP Project Rubric.pdf
Here are spring semester "Mini-Project" descriptions
Sorting and Searching Mini-Project (updated: 30 Jan 11)
Sorting & Searching Mini-Project Grading Rubric (updated: 30 Jan 11)
Timer/Stopwater Test Bench (.java files)
Recursion Mini-Project (updated: 30 Jan 11)
Recursion Mini-Project Grading Rubric (updated: 30 Jan 11)
Timer/Stopwater Test Bench (.java files)
NumberSystems Mini-Project (updated: 30 Jan 11)
NumberSystems Mini-Project Grading Rubric (updated: 30 Jan 11)
Cisco Binary Number Game
- Write a class with class variables
- Write methods (getters and setters) for the class variables
- Write a one-argument constructor
- Create an array of objects in a driver using a constructor
- Place objects into the array
- Access class methods (getters, setters, and constructors) in the array via a for loop