Implement a Java program for searching words in a document. To enable efficient word search your code Preprocesses, the document stores all the words found in the document and the line where they are found in a hash table. (the words are the keys and the lines are the values). You may use Hashtable Hashmap for this assignment, or implement your own hash table. Test using Program Using this document and different words as queries. For Example, If the query word is "algorithm" your program should report that it is not found in the given document; and for the query word "Data" your program reports that it is found six line; [2, 4, 8, 9, 11, 12 ]. (20 point)
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |