CMPS 144 Fall 2023
Test #2 preview
The kinds of problems you can expect on the test include the following:
- Given a class hierarchy (e.g., Counter and its descendants in
Lab #5) and a program that makes use of objects from classes in that
hierarchy, be able to trace execution of that program and report its
results. (In particular, that would involve understanding, with respect
to a method call obj.doSomething(), which version of the
doSomething)() method actually gets called (among the
possibly multiple versions found in classes in the hierarchy).
- Show the history of a queue used in the algorithm that solves
the Single-source Uniform-cost Shortest Paths problem.
(Recall Lab #9.)
- Given a code segment that manipulates references/pointers
to Link1 objects, be able to trace execution of
that code and report its results. (See Lab #7.)
- Given a relatively simple computational problem pertaining to
positional lists with cursors, develop code that solves it.
Or, given code that processes such a list, show/describe
what effect it has or what value it computes.
See Lab #10.
- Given a recursive Java method, be able to trace its execution and
show its effects, as in
this table.
- Given a computational problem that has a relatively simple
recursive solution, provide such a solution (in the form of
a Java method). See Lab #11.
- Be able to develop a class that either implements a Java interface
such as java.util.Comparator or RedBlueClassifier
or that makes use of an object from such a class.
See Lab #11.