CMPS 144 Spring 2025
March 14 test preview
The kinds of problems that you should be prepared to answer
on the test include the following:
- Given a relatively simple computational problem similar to one
that you would have solved in developing a solution to any among
Programming Assignments 1 through 4, develop code to solve it.
- Given some relatively simple computational problem (e.g., possibly
involving an array) and a loop invariant to guide you, develop code
to solve the problem in a manner consistent with the given loop
invariant.
(Recall the lectures pertaining to 2-color and 3-color partitioning,
as well as Lab #5, in which you implemented loops that conformed
to specified loop invariants.)
- Show the history of the pair of stacks used in evaluating an
FPAE (or some variation of an FPAE). (Recall Lab #7.)
- Show the history of the queue used in the algorithm that performs
a breadth-first search to solve the Single-source Uniform-cost
Shortest Paths problem. (Recall Lab #8.)
- Given a code segment that involes Link1 objects,
be able to manually trace its execution and report its results.
(Recall Lab #8.)
(Tracing execution means showing the values of relevant
variables at specified points during execution, as might
be produced by print statements.)
- Given a relatively simple computational problem involving
Link1 objects, develop code that solves it.
(Recall Lab #8.)
- Given a relatively simple computational problem pertaining
to lists-with-cursors, develop code that solves it.
(Recall Lab #9.)
- Develop a class that implements the java.util.Comparator
interface, or the RedBlueClassifier interface, or a
similar kind of interface. (Recall Lab #9.)
- Develop code that makes use of a class that implements
an interface such as Comparator, RedBlueClassifier or a
similar interface. (Recall Lab #9.)
- Given a recursive Java method, be able to trace its execution and
show its effects, as in
this table.
(Recall Lab #10.)
- Given a description of a simple computational problem and
hints about how to solve it using a recursive approach, be able
to devise a recursive Java method that is faithful to those hints.
(Recall Lab #10.)