A List of Questions to Know for the Final

  1. Arrays

    1. How to declare an array

    2. How to allocate space for an array

    3. How to find the min/max/sum/average

    4. How to find the number of elements of an array that exceed a certain value

  2. Objects

    1. How to initialize

    2. What is a constructor

    3. How does a child object get painted on the screen

  3. Control Structures

    1. The For loop

      1. Normal for loops

      2. For loops that count backwards

      3. For loops that count by multiples, for example 3,6,9 ...

    2. The if

      1. Complex conditionals (with OR and AND)

      2. When does 'else' work.

      3. else and else if

  4. Variables

    1. Types (int, double, String, etc).

    2. How to declare

    3. What is 'scope' and how does that relate to the 'smallest enclosing block'.

  5. Integer math

  6. Math.random()

    1. Make me a random integer between 1 .. 10

    2. Make me a random integer that is 5,10,15,20,25, or 30.

  7. KeyPressed and MousePressed

    1. What must you 'implement'?

    2. What methods must you have?

    3. When does the keyStuff happen

      1. Difference between keyPressed and keyTyped

      2. Difference between getKeyCode and getKeyChar

    4. When does the mouseStuff happen

    5. How to get the (x,y) where the mouse event happened.

  8. Methods

    1. When is paint called and why

    2. When is the constructor called and why

    3. When is mousePressed called and why.

    4. Which must 'return true', a boolean function or a void function?

  9. Graphics

    1. The basic primitives (drawLine, drawString, etc).

    2. Colors

    3. When does 'paint' get called

    4. What is the difference between paint() and repaint()