Refactor task 6 to add a feature. Over and above what we did in task 6, we also want to print the number of times each word occurs in the input text file. This detail should be printed such that the word count appears in the same order as the words are encountered in the input file. The program will also accept an ignore file containing words that should be ignored for the count.
Output for the text appearing above will be something similar to this:
Refactor - 1
task - 2
6 - 2
In the code, you must use a Map to store the words as keys and the count as it's value. From this exercise onwards we will also print a debug log as the program code executes. What this means is, you should print something to the console at important points in the program logic. These statements should show the progression of the program. In case the program fails, the debug log might help you determine the source of error quickly without having to debug the code.