IndexBuilder is a class that takes a source file and the array of words to index
ID: 3640692 • Letter: I
Question
IndexBuilder is a class that takes a source file and the array of words to index and finds all of the occurrences of each word in the file. Write a IndexBuilder that takes a file object named sourceFile and a String[] object named indexWords as constructor arguments.*The constructor should read the file line-by-line. As it reads each line, it should collect the following statistics:
*The total number of words and lines in the file.
* The lines where each index word appears - ignoring case and accounting for lines where an index word may appear more than once.
*You should only have to read each file once if you are doing this program properly.