@@ -0,0 +1,1002 @@
+package hk.ust.comp4321.database;%0A%0A/**%0A * %0A * @author Alex Poon%0A */%0Apublic class DocInfo%0A%7B%0A%0A  //Constants and fields.%0A  // -------------------------------------------------------------------------%0A%0A  private String word;%0A  private int frequency;%0A%0A  // Constructors.%0A  // -------------------------------------------------------------------------%0A%0A  /**%0A   * This constrcutor encapsulates the word id and frequency in a document.%0A   * %0A   * @param id      the word id to be inserted%0A   * @param frequency the associated frequency%0A   */%0A  public DocInfo(int id, int frequency)%0A  %7B%0A    this.id = id;%0A    this.frequency = frequency;%0A  %7D%0A%0A  /**%0A   * This method returns the word id of the word instance.%0A   * %0A   * @return the word id of the word instance %0A   */%0A  public int getId()%0A  %7B%0A    return this.word;%0A  %7D%0A%0A  /**%0A   * This method returns the frequency of the word instance.%0A   * %0A   * @return the frequency of the word instance %0A   */%0A  public int getFrequency()%0A  %7B%0A    return this.frequency;%0A  %7D%0A%7D%0A

Add doc info