CPSC 120 -- Test #3 Review Topics
- Applets & GUI Applications (Sections 3.9 - 3.11, 4.6 - 4.9)
- 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
- Comparing Data (Section 5.3)
- How do you compare primitive data types?
- How do you compare objects?
- Can you test floats and doubles for equality?
- Loops (Sections 5.5 (while), 5.7 (do...while),
5.8 (for loops - plus "Reading from Text Files" part of
the section "Iterators and for Loops").
- Know the three basic loop structures and the differences
among them; given a loop of one type (for example, while) be able to
write an equivalent loop of another type.
- Be able to trace a loop to determine what it does - this includes
showing values of variables as it executes, showing what it prints,
or giving a verbal high-level description (such as finds the product
of the multiples of 3 from 1 to n).
- 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 products,
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 use a loop to ensure valid input (keep
making the user enter values until the value is in the correct
- Be able to write and understand complex loops containing method calls,
conditions, and other loops (nested loops).
- Logic (Handouts)
- Know the basic laws of logic (DeMorgan's laws, distributive law,
associative law, commutative law, idempotent law, etc.).
- Understand the connection between logic and computer circuits --
be able to write a logic statement equivalent to a given circuit, be
able to simplify the statement using the laws of logic and then draw
the simpler circuit
- Be able to construct circuits given either a truth
table for the output or a verbal description of the output of the circuit.