Reads a file (identified by inputfilepath), one character


 Reads a file (identified by inputFilePath), one character at a time.
* Products start with

and end with

as explained above. 
* Reviews start with and end with as explained above.
* Any text not inside of one of these tags should be ignored.

* You may use only CharacterFromFileReader to read characters from the
* input file.

* In order to simplify the code writing experience, it is recommended
* that you use a switch statement where the case would be the state.
* This way, you only need to worry about what happens when you are at
* that state. You should, however, fully understand the state diagram
* as a whole and in parts, as you will be required to complete this
* assignment next week at the beginning of lab.

* @param String
* inputPath the path on the local filesystem to the input file
* @returns a HashMap containing the product->list of reviews mappings.
*/

public HashMap> fillHashMap(String inputPath) {
HashMap> map = new HashMap>();
CharacterFromFileReader cffr = new CharacterFrom FileReader(inputPath);
int product = 0 ;
char review = null;
return map;

Request for Solution File

Ask an Expert for Answer!!
English: Reads a file (identified by inputfilepath), one character
Reference No:- TGS075049

Expected delivery within 24 Hours