|Quiz||Posted||Given in class|
Name: Lab Section:
public boolean isPunctuation(char ch)which indicates whether the supplied character is a puncutation symbol. and the constructor for KWIC now also takes a String:
public KWIC(String punctuationChars)so that if I do
KWIC kwic = new KWIC(".,!?");then every character in the supplied string should be treated as punctuation.
Why can or cannot the
isPuncutation method be a static method
return (new HashSet()).iterator();How can the Singleton pattern be applied here to save on instances of HashSets?