K. Tsang wrote:Ah in your getWordCount method, the map words is empty when you instantiate it.
You have a analyzeText method that looks like reading the file and populating the map words. Yet you didn't call this method.
Steps are:
1. instantiate FrameAnalyzer variable
2. call analyzeText method
3. call getWordCount method
After this you should get a non-zero value.
By the way in the analzeText method, FileNotFoundException is a subclass of IOException. Just a thought, is Scanner a good choice for reading files?
Aw okay. I noticed I was never calling
method from TextA_1 -____________- Also
were not implemented correctly in their respectful places.
Anyways, it is working now !!! Boooooooooooooyah!!! Thanks for the help guys!