• 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)

  1. 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.
  2. 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.
  1. Click File | New Project. Type the name of the project. A project will keep all of your .java file(s) together for easy management.
  2. Click "New Class" in the BlueJ window. Type the name of the file (BlueJ will add the required .java extension automatically).
  3. Click on a "Class Type". The simple "Class" is sufficient to start.
  4. Click OK to save the file.
  5. Double click on the icon for the class that you just created.
  6. Type in the source code for you Java program.
  7. Press "Compile" (or press Apple-K) to compile your file(s).
  8. Close window that holds your java program
  9. Right click on the file that contains "main" and click on "void main(String [] args)"
  10. 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
  1. Always begin with a letter
  2. Use a-z, A-Z, 0-9 ONLY (no underscores)
  3. Use camelNotation for variable and method names
  4. Use "final" whenever possible
  5. Use MEANINGFUL NAMES!!
  6. Begin class names with a capital letter with CamelNotation
  7. Brace spacing and indentation - ALL THE TIME with if, for, while statements
  8. ( Parenthesis spacing ) all the time!
  9. Use spacing liberally…memory is CHEAP!

3. Commenting rules
  1. Comment end curly brace of classes, methods, loops( while, for), and if statements
    while( ... )
       {
       } // end while loop
  2. Comment purpose of methods using Javadocs with @param and @return
    Javadoc comments
  3. Comment purpose of loops (while, for)
  4. 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
Test 2:
  - 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
© 2007-2012 Michael Lew
apcsIndex