• Methodology
  • Setup
  • Links
“As to methods there may be a million and then some, but principles are few. The man who grasps principles can successfully select his own methods. The man who tries methods, ignoring principles, is sure to have trouble.”
- Ralph Waldo Emerson

1. Teaching Methodology 2. Lew's Syllabus and Planner
3. Establish project / file naming rules
  • Always have "Project" at end of names of project (e.g. ArrayListProject, MyCritterProject)
  • Always have students use directories to organize projects for quick retrieval
4. 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!

5. 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
  • Comment purpose of loops (while, for)
  • Comment purpose of if-else statements

7. Good OOP Programming Guidelines
  • Do NOT replicate code that is already written somewhere else (CODE REUSE!)
  • You are NOT coding only for yourself!! – Comment code and NO tricky stuff, please!!

1. 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. Follow the steps below or watch the following video (.mov) that demonstrates the process.
  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!

2. How do I create a project, java file, compile, and run a program?
If you have BlueJ up and running, then try some of the sample programs in either of the above recommended books (or any book that you may have). Follow the steps below or watch the following video (.mov) that demonstrates the 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!

3. The Javadoc commenting convention
Javadoc comments



4. JCreator
JCreator



faqs   pedagogy   content   eThreads
daily schedule

*AP is a registered trademark of the College Board.
© 2010 Michael Lew