- Display your understanding of Hashmaps
- Import external text file and process it's contents
- Unit Test
This lab involves reading in a text file, word by word. Each unique word will be stored once and only once in a hash map. Each additional occurrence of that word found in the text will cause an associated counter to be incremented. Once all the words have been counted output all the words in the map with their occurences.
Create an object that can be except a text file location as well as display the result of the word count in alphebetical order. Also display the count of unique words, most/least used words and the longest word. Finally create a method that accepts a string value and return the word count of that string vale.
You will find a text file in the root directory of this repository for you to use but your program should be able to work on any text file.
Once you have completed the class(es) above, use the main()
to allow a user to enter the location of a text file for the word counter to execute on. This should display the results to the user, as well as, allow the user to enter a string value and have the program return the amount of occerences of the string.