File Category Processor (JAVA-8/9)

As a general requirement: Please make sure I can execute the code on my local machine, i.e. please provide all required dependencies and installation documentation or a ready to use build configuration, e.g. a maven pom.xml.

Please write a program that reads file [login to view URL] which you find [WRITTEN BELOW ****]

In this file you’ll find lines containing categories and data. The categories are “ANIMALS” and “NUMBERS”.

Please note that categories are fix values, i.e. they are NOT determined by being written upper case.

Each line following a category represents data items that belong to the previously read category (unless the new line represents a category itself)

After reading and processing the file please output to the system console:

A sorted list of all unique data items of category “ANIMALS”, i.e.

ANIMALS:

cow

horse

moose

sheep

A list of all unique data items of category “NUMBERS”, followed by “: “ and the number of occurrences of the respective data item

Provide Unit tests for your code.

Please make sure you have correctly implemented code for categories NUMBERS and ANIMALS.

Now, as a Change Request, you are to add functionality to your program that allows for processing a new category called "CARS"

Read & process file "[login to view URL]“ which contains category, "CARS“, as well as NUMBERS and ANIMALS.

1) Make sure the input file is read and processed only once (as if the file was large and expensive to process).

2) Do not use if/else, switch/case or Ternary Operations in your code.

3)The code should be written in a way that allows for adding more new categories (that might have even different logic and output formatting) without changing the existing code base (open closed principle).

4) Make sure to provide test cases

5) Need best-in class code (as per checkstyle and SONAR), as we have already implemented the code, but need best in-class code.

6) Code has to be done by today itself(13/06/2018).

7) Fixed budget.

8) Money to be paid only after review of successful written and executed code.[Please Note this carefully].