Submitting


The following classes must be submitted in order to be graded:

  • BinarySearchAutocomplete.java
  • Term.java
  • TrieAutocomplete.java
  • Make sure when you submit, all of the following are present and functional:

    
    Class: BinarySearchAutocomplete
     Constructor: BinarySearchAutocomplete(String[], double[])
     Method: public String topMatch(String)
     Method: public String[] topKMatches(String, int)
     Method: public static int firstIndexOf(Term[], Term, Comparator)
     Method: public static int lastIndexOf(Term[], Term, Comparator)
    Class: TrieAutocomplete
     Constructor: TrieAutocomplete(String[], double[])
     Method: private void add(String, double)
     Method: public String topMatch(String)
     Method: public String[] topKMatches(String, int)
     Field: protected Node myRoot
    Class: Term
     Class: Term$WeightOrder
      Method: public int compare(Term, Term)
     Class: Term$ReverseWeightOrder
      Method: public int compare(Term, Term)
     Class: Term$PrefixOrder
      Constructor: Term$PrefixOrder(int)
      Method: public int compare(Term, Term)
      Field: private final int r
     Constructor: Term(String, double)
     Method: public String toString()
     Method: public int compareTo(Term)

    You also must submit your README in order to receive any credit.

    If you create any new classes which are required for the above classes to compile, you should submit those as well.

    Any other classes we provide you should be considered “read-only” - if you submit them, the grader will replace them with the unmodified version you snarfed. Thus, you are free to modify them for testing, but the classes you submit should not depend on those modifications in order to be compile/have the correct return values: