import DataStructures.*;
import Exceptions.*;
import Supporting.*;

public class WhichInsert
{
        // Test program that illustrates that method
        // parameters are statically bound.

        public static void main( String [ ] args )
        {
            MyInteger m = new MyInteger( 5 );
            Object obj = new Integer( 5 );
            SortListItr itr = new SortListItr( new LinkedList( ));

            itr.insert( m );  // calls insert( Comparable )

            try 
              { itr.insert( obj ); }
            catch( ItemNotFound e )
              { System.out.println( "Item1 not Comparable" ); }

            obj = m;
            try
              { itr.insert( obj ); }
            catch( ItemNotFound e )
              { System.out.println( "Item2 not Comparable" ); }
        }

}
