CPSC 120 -- Test #3 Review Topics
- Loops (Sections 5.5 (while), 5.7 (do...while),
5.8 (for - omit the part about iterators and for loops),
Labs 7 - 10, class notes)
- Know the three basic loop structures and the differences
- Be able to trace a loop to determine what it does.
- 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).
- Know what is meant by a count-controlled loop (and how to write one)
and a sentinel controlled loop (and how to write one).
- 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 or find the first character
after a blank.
- Be able to write and understand complex loops containing method calls,
conditions, and other loops (nested loops).
- Objects and Classes (Sections 3.1, 4.0-4.4, Labs
5 - 10,
class notes and handouts)
- 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
be able to use an object appropriately given the type signatures and
reasonable documentation for its methods.
- Be able to write a class given a description of the capabilities required
- Understand the meaning of the public and private modifiers
and when each is appropriate.
- Understand the meaning of encapsulation.
- Methods (Sections 4.3, 6.7 - 6.8, Labs 5 - 10, class notes
- Be able to write a method to perform a given task.
- Understand the difference between formal and actual parameters,
and how both primitive values and objects are passed to a method.
- Understand the scope of identifiers - where formal parameters
can be referenced, where local variables can be referenced,
where instance variables can be referenced.
- Be able to write methods (including main) that call other methods as
- Applets & GUI Applications (Sections 3.9 - 3.10, 4.6 - 4.9 Lab 10, class notes
- Understand the difference between Applets and GUI Applications
- Understand the relationship between events and listeners
- Understand the difference between frames and panels
- Understand the general framework for constructing a GUI component
that responds to events.
- Understand the use of inner classes, why they are useful and why they
are necessary. Be able to describe the scoping rules of variables with
respect to inner classes.
- Be able to describe the appearance of a GUI Application from the code