next up previous


Name: Key CMPS 109 Quiz 3  February 11, 1999

This is a closed notes, closed book exam. All of the problems on this exam, refer to the additional classes that are displayed on the projection screen. You should assume that all of the classes are in a single directory. There are no syntax errors in the classes displayed on the screen. For each problem there are three possible answers. First, the class in the problem may contain a syntax error, if so, identify the error and correct it. Second, executing the class may result in a runtime error (i.e. throw an exception), if so, identify the error. Third, there may be no errors, if so, show what is printed by the program. All errors are related to inheritance and dynamic method dispatch.

Hint: Only two problems contain syntax errors. In the first such problem the error can be corrected by inserting characters, no deletions are required. In the second such problem one identifier needs to be changed. There is only one problem that will generate a runtime error.


next up previous
Charlie McDowell
2/12/1999