CSCI 1152 Project - Processing Text File This assignment has three objectives: 1. to process strings 2. to compare, search, sort, and verify location of specific pattern 3. to output result via interface Description Write a Java program to read a text file (command line input for file name), process the text file and perform the following. 1) Print the total number of words in the file. (When using java_test.txt, I calculate the number of words, including number, as 254.) 2) Print the total number of different words (case sensitive, meaning "We" and "we" are two different words) in the file. (When using java_test.txt, I calculate the number of different words, including number, as 168.\( ) \) 3) Print all words in ascending order (based on the ASCII code) without duplication. 4) Write a pattern match method to find the location(s) of a specific word. This method should return all line number(s) and location(s) of the word(s) found in the file. 5) Print all line(s) with line number(s) where the word is found by invoking the method of 4). Under each output line indicate the location(s) of the first character of the matched word (refer to the output example below). 6) Empty lines are lines, they also have their own unique line numbers. 7) Repeat the pattern match ( 4 and 5 above) until user types in EINPUT. Important Note: 1) You must construct your own searching and sorting methods and use them to perform sorting and searching. No credit will be given if you use built-in methods as Collection.sort or classes such as ArrayList. You may use built-in String methods such as equals, compareTo, indexOf, split, or others that you find useful. 2) You must construct your own method to extract tokens (words) from either character arrays or strings. 3) You may construct a Class using an array of strings or array of character arrays (char array) to store the original text from the input the file A word is defined by any combination of alpha (upper or lower case) and numerical characters, all other characters are delimiters. Input The name of the text file should be read in from the Command line arguments.
You may not use ArrayLists. You can and should use String arrays. You must calculate in the code the size that is needed for these arrays. As in, you may not preset the array sizes using literal values in the code.