Comp 170 Lab 6 - Tech Support, March 1

The tech support system attempts to make plausible responses based on simple matching with the user input. Currently there are two levels: Your assignment is to add a third level between these two: after keywords, but before random responses. You are to look for "question words" that begin the user input, such as "who", "what", "where", "how", "why". Actually, you won't require that the word begin the sentence, but you are to find the first word that matches one of these, and base the response on that. Thus, if the user types "why is it that I cannot find what to do", you are to choose the why response. Note that this requires you to use the ArrayList representation of user input rather than the HashSet, because you need to go through the user input in order. You can find the ArrayList version here.

Steps (all changes are to the Responder class)

Here are the words, together with some possible responses. Feel free to improve them. Many responses here are based on a rather hypothetical guess as to the actual question.

word response possible question
who To contact an individual, go to our home page and click on the "directory" button who is in charge of this mess?
what we use our product every day; we find it meets actual user needs quite well what is wrong with your product? (a stretch)
where have you tried looking in the manual or the help files? where can I find out how to ....
when We expect to release that feature Real Soon Now. When will the fix be available?
how try looking up your topic in the index, or in the "how-to" tutorial. how do I reformat a header?
why Perhaps you should reread the manual on that topic. why can't I get cut-and-paste to work?

The reason these aren't included in the first keyword HashMap (the HashMap called responseMap that includes "bug" and "windows") is that they are substantially less precise; we'd like to check for all of the first group of keywords before trying these.

Email me your completed Responder.java file.