Homework 1

Due: Jan. 29, 2001


The purpose of this assignment is to make sure everyone understands how to use interfaces, and can answer for themselves the question that came up in class.

The following refers to the SortableInterface example on the web page. Suppose you have several compareTo routines with different signatures (say one takes an Object o, another one takes a SortablePoints p). The question was:  if both are defined in the SortablePoints class, which method will be called? Can you force the other one to be called?
Answer by email: you can explain the answer and how you tested it, without actually sending me code.