CPSC 120 -- Test #3 Review
Topics
- Loops (Sections 3.6-3.10, Labs 7 & 8, class notes)
- 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 use a loop
to go through a string character by character and do something such
as count a particular type of character, find the first character
after a blank, find characters that don't belong (as in your RomanNumeral
class).
- Be able to write and understand complex loops containing method calls,
conditions, and other loops.
- More Operators (Section 3.5 pages 153 - 156)
- Increment and Decrement Operators; Assignment Operators
- Objects and Classes (Sections 4.0-4.5, 5.0-5.1, Labs 9 and 10,
class notes)
- Understand the difference between objects and primitive values, including
the difference in how they are stored (directly vs. references).
- Know what an alias is and what garbage is!
- 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.
- 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 meaning of encapsulation.
- Methods (Sections 4.2-4.4, 5.0 - 5.1, Labs 9 and 10, class notes)
- 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 the difference between formal and actual parameters,
and how both primitive values and objects are passed to a method. Be
able to trace method calls to show how parameter passing works and
how local variables are handled.
- 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.
- Wrapper Classes & Dialog Boxes (Sections 5.2 & 5.6, Lab 11,
class notes)
- Understand what a wrapper class is; know what wrapper classes Java
provides.
- Be able to use methods in a wrapper class given the
signatures for the methods.
- Know what dialog boxes are and what the three main categories provided
by Java are.
- Be able to use dialog box methods in the JOptionPane class if
given the signatures; understand why the value returned by an input
dialog box often needs to be "parsed."