java: determine ratio, from multiple inputs and duplicate input
<p>I would like to determine the ratio of how many times  a costcentre appears in that asset</p>

<p>might be easier to show than explain</p>

<p><strong>Input File</strong></p>

<pre><code>asset_id|employee_id|costcentre_id

1|123|2

1|342|2

1|122|3

2|231|4

2|232|3
</code></pre>

<p>which should return</p>

<pre><code>asset_id|employee_id|ratio

1 | 2 | 1                                //because more than 50% of 1 was allocated to 2

2 | 4 | 0.5                                //because not more than 50% ...

2 | 3 | 0.5                                //because not more than 50% ...
</code></pre>

<p>ofcourse the input looks much worse than that, imagine. . .</p>

<pre><code>5|503|18

5|742|18

5|861|18

5|408|18

5|330|18

5|440|18

5|102|18

23|418|5

26|723|70

26|466|89

26|376|85

26|839|89

28|811|189

28|1224|244

28|302|72

28|348|244

29|229|47

31|655|80

44|250|10

44|729|81

44|867|10

44|960|81

44|973|81  //just a small piece of the input file
</code></pre>

<p>It will need to determine the amount of times the asset_id is there then it will get values for each one and determine if there were more than 50% allocated to a costcentre, give it a ratio of 1 and output results of that one entry.</p>

<p>if it does not have more than 50% of costcenter id's that are the same it should split the ratio how to the formula ratio = (amount of times its there/count number of other times)</p>
