In order to follow this question you will necessarily need to see the files being attached.
The original code and output are shown in the files under Lab4Original.zip
The modified code and resulting output are shown under Lab4dVersion1.zip
Description of the problem
The desired output should be ONLY the list of words sorted in alphabetical order (a to z). Case sensitivity and special characters should not matter.
The given files are cisio.java, Index4.java, lab4d.java, Token.java and Node .java.
I have changed the extension on all of these to .txt.
The input file is lab4d3.txt. The given output file is Output_Given.txt. It is what you get when you run the given code.
In order to get the desired output of alphabetically sorted words all I did was the following
1)Added an insert(t) method that inserts strings in a sorted manner in the Index4.java file.
2)Called this insert(t) method from the lab4d.java (main) file.
I did not modify anything else this far. I realize that there are things that are needed to be modified so that
1)there is no paragraph with lines numbers in the output and
2)I get the words in a more correctly sorted fashion than I have them now in my Version1 of the output.
You can see the results of these changes in Output_Version1.txt. This however is not the fully correct desired output. I have got only partial results.
Please note that you can see the changes I have made to the original files under the Lab4Verion1.zip folder. Once again I have had to rename Index4.java to Index4.txt and lab4d.java to lab4.txt. All other needed files you need to run in order to get the output that I am getting now are the same as in the original. These have not been changed, so I did not re-include them in this folder.
So if you can please examine this at leisure and get back to me as to what changes are needed in order to get the desired output(which is ONLY the alaphabetically list of words (the special characters and case do not matter), I will be grateful. In the meanwhile I am trying to solve this myself.
If anything is not clear please ask the question and I will clarify