CPSC 120 -- Test #3 Review
- Loops
- Know the three basic loop structures and the differences
among them.
- Be able to write loops -- be able to correctly control
the loop (write the appropriate boolean expression for the loop control
condition, initialize any variables in that expression (loop control
variables) before the loop, update those variables correctly
inside the loop).
- Be able to perform common looping subtasks -- summing, counting,
finding averages, finding max and min values.
- Be able to write and understand complex loops containing method calls,
conditions, and other loops.
- Objects and Classes
- Understand the difference between objects and primitive values, including
the difference in how they are stored (directly vs. references).
- Be able to create an object given the type signature of one or more
constructors of the appropriate class.
- Be able to use an object appropriately given the type signatures and
reasonable documentation for its methods.
- Understand the difference between static and instance variables, and
when each should be used.
- Understand the difference between static and instance methods, how each
is accessed, and
when each should be used.
- Understand the difference between static or instance variables, formal parameters, and local variables, and the scope of each.
- Be able to write a class given a description of the capabilities required
of it.
- Understand the meaning of the public and private modifiers
and when each is appropriate.
- Understand the role of wrapper classes and, given signatures, be able
to use methods from those classes.
- Be able to create and use a StringTokenizer object to parse a string.
- Methods
- Be able to write a method to perform a given task.
- Understand all components of a method's signature -- public/private,
static/instance, return type, method name, formal parameters.
- Understand what it means for a method to return a value, and be able
to both write and use such methods.
- Understand when it is appropriate to use a method call as an expression
and when it is appropriate to use it as a statement.
- Understand the difference between formal and actual parameters,
and how both primitive values and objects are passed to a method.
- Understand how a method can be overloaded, and be able to
write and use overloaded methods.
- Be able to write methods (including main) that call other methods as
appropriate.