Hi russjam,
Thank you for taking an interest in my work! Since I wrote the Java
program for myself, I originally didn't include any explanatory
comment. Since it was intended for a one-time use, I just chose the
most straightforward way to implement it, instead of a possibly more
efficient method.
I have added explanatory comments to help with reading the code. You
can download the files at
http://www.ics.uci.edu/~dhnguyen/FileExtraction/ . The code consists
of three files. The file named Extract.java contains the actual
algorithm to reduce extraneous data. The other two files,
FileWriter.java and FileReader.java are two helper classes that I
often use to read to and write from files. Download these three files
as well as the data file into the directory, and compile them. When
you run Extract.class, it should produce the same output as mine.
I hope that this answered your question. If there is anything you
don't understand in my code, feel free to request for a clarification
before rating this answer and I'll be happy to clarify.
Thanks,
secret901-ga |