Variable Types
  1. Primitives: int, double, boolean ("clock" analogy for overrunning bounds of int)

  2. Wrapper classes: Integer, Double, Boolean
    Example: Integer myInteger = new Integer( 10 );
    Example: Double myDouble = new Double( 3.14 );
    Example: Boolean myBoolean = new Boolean( true );

  3. String
    Example: String myName = new String( "Mud" );
    Example: String myName = "Mud";

  4. Arrays
    Example: int[ ] myArray = new int[10]; // array of primitives
    Example: String[ ] myArray = new String[10]; // array of Objects

  5. ArrayList
    Exampe: ArrayList someArrayList = new ArrayList();

Iteration

  1. for loop
    for( int index = 0; index < someArrayList.size(); index++ )
       {
       }

    for( int index = 0; index < someArray.length; index++ )
       {
       }

  2. for each loop ( aka enhanced for )
    for( Car c : garageOfCars )
       {
       System.out.println( c.getName() );
       }

  3. while loop
    while( ctr < 100 )
       {
       ctr++;
       }

  4. Iterator interface
    Iterator itr = someArrayList.iterator();
    while( itr.hasNext() )
       {
       String s = itr.next()
       if( s.equals( "Java" ) )
          {
          System.out.println( s );
          }

  5. The classic "for loop removal" problem

Decision-Making

  1. if statement
  2. if else statement
  3. switch statement (not tested)

Classes

  1. Instance variables
  2. Methods: getters and setters (or accessors and mutators)
  3. toString() method
  4. Constructors
  5. Uses of "this" ( this.yourValue and this() )

Inheritance

  1. Abstract classes
  2. Interfaces (100% abstract class!)
  3. Polymorphism
  4. Reference types: concrete classes, abstract claseses, interfaces
  5. Uses for super ( super.yourMethod and super() in constructors)

1. Searching and Sorting
Google "searching and sorting simulations" for great graphical simulations of all types of sorts.
MathSite Searching/Sorting Simulations
Big-O Tutorial
  1. Sequential search
  2. Binary search
  3. Selection sort
  4. Insertion sort
  5. Mergesort

Here is the mini-project description for the Sorting/Searching Project
Sorting and Searching Mini-Project
Sorting and Searching Mini-Project Rubric

Some Search/Sorting Role Play Picutures
Sort 1  Sort 2  Sort 3
Sort 4  Sort 5  Sort 6
Sort 7  Sort 8  Sort 9
Sort 10  Sort 11  Sort 12


2. Recursion

3. Number System Conversion (dec, bin, hex, oct)


Java Collections
  1. ArrayList
  2. Linked Lists
  3. Stacks/Queues
  4. Sets (HashSet, TreeSet)
  5. Maps (HashMap, TreeMap)
  6. BSTs

faqs   pedagogy   content   gridworld
daily schedule

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