CMPS 144 Spring 2024
Test #2 preview
The kinds of problems you can expect on the test include the following:
- Show the history of a pair of stacks used in evaluating an
arithmetic expression (such as in Prog. Assg. 3).
- Given a code segment that manipulates references/pointers
to Link1
objects, be able to trace execution of that code and report
its results.
Or, given a relatively simple computational problem involving
Link1
objects, develop code that solves it. 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 value it computes and/or what effect it has on the list.
See Lab #8.
- Given a recursive Java method, be able to trace its execution and
show its effects, as in
this table.
- Given a description of a simple computational problem and strong
hints about how to solve it using a recursive approach, be able
to devise a recursive Java method that is faithful to those hints.
See Lab #9.
- 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 #8.
- Given a binary search tree and some insert/remove operations to
perform upon it, show the effect of each operation upon the tree.
- Given a max-heap and some insert/deleteMax operations to
perform upon it, show the effect of each operation upon the heap.
See Lab #10.