The format will be like the first quiz and, as for the first quiz, you may bring a crib sheet to the exam, subject to the following restrictions. The crib sheet must be a single sheet of paper, 8 1/2" x 11" at the largest. You may write on both sides of the sheet. You may write whatever you like. But everything on the sheet must be written by you, by hand, and directly onto the sheet. Photocopying is specifically disallowed. You will hand in your crib sheet with the quiz, and you will get it back with the graded quiz. The crib sheet will in no way affect the grading of the quiz.
We expect to have the graded quizzes back to you by Monday, November 2.
These questions are representative of the type that I ask. Do not interpret the following as a full practice quiz!!
breed will refer to the same String
object as the parameter breed.
int to a
String. For example, if we convert an
int with the value 47 to a String,
the String should consist of the characters
47. (The period after 47 ends the
sentence and is not part of the String.)
Explain why, if we have the declaration int x, we
cannot call x.toString() to convert x
to a String. Then show how we can convert
x to a String by calling an
appropriate method. (No fair concatenating x with
the empty string.)
repaint method do?
repaint method
is called, what method should include this line? Suppose that,
instead, you want the line of code to execute only when the
applet is first loaded. What method should include this line?
mouseDragged event, we typically call
init method.
If you were writing the addMouseMotionListener
method, what would the header for this method look like? What
would the class declaration for the applet have to say in order
for the call to addMouseMotionListener to be
legal?