AP Computer Science -
Test 2 - Review
General Notes
The test will include topics from
- material covered in class up to this point, including:
- material covered in Unit 1, Unit 2, and Unit 3 (available
online)
- material covered in the programming assignments you've written
Things to review in
particular
Everything we've covered up to this point, including:
- Errors - syntax (compile), run-time, logic, overflow, rounding
- Data types -
int, double,
String, boolean
Strings, including:
.length() to get the length of a string
.substring(start, stop) to get a subset of a
string
Methods, including:
- declaring methods (
public static returnType methodName( parameterType parameterName)
)
- calling methods
- sending data to a method using parameters
- returning data from a method using a
return
statement
Conditionals (if-else) statements, including:
- boolean expressions (that have a value of
true or
false)
if-else statements
- Boolean relation operators:
<, >, ==, <=, >=, !=
- Boolean logical operations:
&&, ||, ! ("and",
"or", and "not")
- Using DeMorgan's Law to distribute a "not" operation
- Nested
if-else statements
- A sequence of
if-else statements
("switch-style")
- Comparing strings (using the
.equals() method)
- Comparing
double values using the EPSILON
strategy