You will need to show us an example of the input file.

Also, what currently happens when you run the program? Does any of it work?
Are there any exceptions thrown? Which part are you stuck on...