next up previous


Name: Key CMPS 109 Quiz 3 Bonus  February 18, 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.

Here is a description of the four problems, but the order has been changed. Part of the quiz is to determine which problem fits the description.

Here are the classes that were projected during the quiz.

class ClassOne{
  public void print()
  { 
    System.out.println( "inside ClassOne");
  } 
}

class ClassTwo extends ClassOne {
  public void print()
  {
    System.out.println( "inside ClassTwo");
  } 
  public void bar()
  {
    System.out.println("bar in ClassTwo called");
  }
}

class ClassThree extends ClassOne {
  public void foo()
  {
    System.out.println("In foo from ClassThree");
  }
}

next up previous
Charlie McDowell
2/19/1999