CS 226 Homework 1 Due Monday February 5, 5 p.m. Implement the simple JHUgle lookup class discussed during lecture. This will involve instantiating two interfaces given below: public interface TermPair { // Compare this pair's term to a supplied term public boolean termEQ(String term); // Return the components of the pair public String term(); public String URL(); // The java "toString" function for converting to a printable // Representation public String toString(); } public interface TermSet { // Add a term to the database as a pair public void addTerm(String term, String URL) throws RuntimeException; // Add a term already paired up public void addTerm(TermPair term) throws RuntimeException; // Return the setof terms matching the given term public TermSet lookUp(String term); // The java "toString" for converting to a printable // representation public String toString(); } For example, my main program looks like this class JHUgle { public static void main(String[] args) { TermSet1 test = new TermSet1(10); test.addTerm("term1","URL1"); test.addTerm("term1","URL2"); test.addTerm("term2","URL2"); test.addTerm("term3","URL1"); test.addTerm("term4","URL3"); TermSet queryres = test.lookUp("term1"); System.out.println(queryres); } } The output is Moe: hager$ java JHUgle