AP Computer Science - Test 2 - Review

General Notes

The test will include topics from

  1. material covered in class up to this point, including:
  2. material covered in Unit 1, Unit 2, and Unit 3 (available online)
  3. material covered in the programming assignments you've written

Things to review in particular

  1. Everything we've covered up to this point, including:

    1. Errors - syntax (compile), run-time, logic, overflow, rounding
    2. Data types - int, double, String, boolean
  2. Strings, including:

    1. .length() to get the length of a string
    2. .substring(start, stop) to get a subset of a string
  3. Methods, including:

    1. declaring methods ( public static returnType methodName( parameterType parameterName) )
    2. calling methods
    3. sending data to a method using parameters
    4. returning data from a method using a return statement
  4. Conditionals (if-else) statements, including:

    1. boolean expressions (that have a value of true or false)
    2. if-else statements
    3. Boolean relation operators: <, >, ==, <=, >=, !=
    4. Boolean logical operations: &&, ||, ! ("and", "or", and "not")
    5. Using DeMorgan's Law to distribute a "not" operation
    6. Nested if-else statements
    7. A sequence of if-else statements ("switch-style")
    8. Comparing strings (using the .equals() method)
    9. Comparing double values using the EPSILON strategy