Some pseudo code:
read a first line and save data for the first agent as current agent
begin loop to read through rest of data in the file
Read next line of data from file
Is this data for...
Type: Posts; User: Norm
Some pseudo code:
read a first line and save data for the first agent as current agent
begin loop to read through rest of data in the file
Read next line of data from file
Is this data for...
Look at the DecimalFormat class. It can be used to format the output to have the 2 decimal places.
The code needs to look at the key for the next line and if it is the same, then add the value to...
Can you post the output that is created, explain what is wrong with it and show what you want it to be.