| Final Exam Grades
and Comments CIT 594, Spring 2005 |
N (number of students taking exam), 30.
Mean (average), 67.00.
Standard deviation, 17.31.
FINAL EXAM * |
WEIGHTED TOTALS * |
In general: Read the question! Many of you would have gotten more points if you took a little more time to understand what I was asking before you answered.
<pair>...boolean pair() method to recognize a "pair"
as defined in the previous question...enum named WEEKDAY,
enumerating the seven days of the week, with boolean method isWorkDay().
isWorkDay() should return true for all days except
Saturday and Sunday. Use proper capitalization (days of the week should be
all caps). if
(myList instanceof ArrayList<Integer>) {...} Person, where each Person
has a String name instance variable. You want to create a set
of Persons, sorted by name (and never sorted any
other way)... hashCode() (such as String),
what range of values is returned by the hashCode() method?
,
tell in what order the nodes would be visited by each of the following techniques:
|
|
||||||||||||||||||||||||
K characters. You have a message
that is N characters long. In each of the following parts, describe
briefly (1) how to do the required task, and (2) how long it
will take to do it (use Big-O notation). N-character message.5 10 ...,
a player may either take the 5, or give the 5 to the opponent and take the
10.) The object is to collect the most money. Fraction(int numerator, int denominator)
which should throw an IllegalArgumentException if denominator
== 0 . Write a JUnit method to test that it throws the exception
correctly.Couples ADT to represent a set of
married couples. The only accessor method will be Person getSpouse(Person p)
which, given one person in a couple, returns the other person. Your operations
should make it possible to create any Couples, and to transform
any Couples into any other Couples. Provide a necessary
and sufficient set of constructors and methods (no convenience methods) to
achieve this. Do not tell what each method does; just choose self-explanatory
names for your methods.getSpouse method (from the previous question) in linear time.