Your method must be non-static and named \'count\'. Its return type must be \'Ha
ID: 3562789 • Letter: Y
Question
Your method must be non-static and named 'count'. Its return type must be
'HashMap<String,Integer>' and its parameter must be of type 'String'. Your
class must have a no-argument constructor.
A description of the required (public) method:
* @param a String denoting the inputPath the path on the local filesystem
* to the input file
* @returns a HashMap<String,Integer> containing the word->count mappings
*
* This method must read the contents of a file (identified by inputFilePath),
* one char at a time, segment the input into words, and keep track of word
* counts in a java.util.HashMap<String,Integer>.
*
* A word is defined as a contiguous sequence of characters that does not
* contain word separator characters, where word separator characters are:
* ' ' (space), ' ' (tab), ' ' (newline), ',' (comma) and '.' (period).
*
* Think carefully about this definition, and how it applies to an initial
* character sequence not preceded by a word separator, and also a final
* character sequence not followed by a word separator.
*
* You must use only CharacterFromFileReader to read characters from the input
* file. Use it as an Iterator<Character>, keeping in mind the autoboxing &
* unboxing feature of the Java language.
*
* In order to keep your code readable, break your code into several methods.
* Define meaningful private helper methods that you call from the required
* public method.