211 Exam1.doc – A
Fall02
- 25
Pts: Write a class that implements this interface:
public interface Exam /** interface to implement */
{
public float getFloat(); /** returns the float within the class */
/** true if larger than float within the class */
public boolean isLarger(float
number);
/** adds number to float
within the class */
public void addTo(float number);
} // end Exam
- 25 Pts: Write a method that returns the first
string in its array of strings parameter that begins with one of your (the test taker’s)
initials.
- 25
Pts: Write a method for Button Array that returns true if there is a
button whose label matches one of your
(the test taker’s) names (first or last) and false otherwise.
- 25 Pts: Write a method that removes a
button from a ButtonArray whose label matches
one of your (the test
taker’s) names (first or last).

211 Exam2.doc – B
Fall02
- 25 Pts:
Write a method that takes a ButtonList
and inserts a Button whose label is your (the test taker’s) last
name after every button whose label is your (the test taker’s) first
name.
- 25
Pts: Write a method that takes
a LinkedList of Strings and inserts a String
that is your (the test taker’s) last name before every string which is your (the test taker’s) first
name.
- 25
Pts: Write a method that returns the last of the Buttons in a
ButtonQueue3 have a label that starts with one of
your (the test taker’s) initials.
- 25 Pts: Write a method that returns the
last of the TextFields in a LinkedQueue
of TextFields whose text starts with one of your
(the test taker’s) initials.

211 Exam 3.doc
– A
Fall02
- 25 Pts: Take all the letters of your first and
last names and put them into a search tree. Output the search tree in prefix,
postfix, and infix.
- 25 Pts: Write a method of Tree that returns how
many of the nodes in the tree are leaves (have no children).
- 25
Pts: Write a method of the recursive list type that returns how many
of the strings on a RList
of strings are your last name.
- 25
Pts: Write a method of the recursive list type that removes every
string on a RList that matches
your first name.