This website is preserved for historical and scholarly reference and is no longer actively maintained.

QUIZ 6

September 3, 1997

#1. The Java text explains the following shorthand assignment statement:

a) Rewrite this statement using the instructions for program style given in class (but still using the shorthand += notation).

b) Rewrite this statement without using the shorthand notation (i.e., use the = assignment operator, not +=).

#2. Is the following code correct? Justify your answer.

#3. Suppose class Employee contains only the following methods

after

a) Write code to give Harry Hacker a $150 raise.

b) Identify the error in the following code.

Return to Eleanor Hare's home page.

Return to Department of Computer Science Home page.