Design an application that opens and analyses word files.
Requirements:
Create an application that analyses text documents. It should open a text file, read each word into an appropriate data structure and analyse them. Once the contents of the document has been analysed, some statistics about the contents should be displayed.
These statistics should be:
The most common word (including the number of times it occurs in the file)
The longest word (including the length of the word)
The shortest word (including the length of the word)
The average word length
If two or more words fulfil any of the previous conditions, all words should be displayed in the statistics output.
The application should also include functionality to search for a specific word or words of a certain length. If the user searches for a specific word, the number of times that word appears in the text file should be displayed. If a specific word length is searched for, all words of that length should be displayed (in sorted order).
You should decide what controls to use in the design of your application. However, it should include a Menu and use a dialog box that allows the user to select a file to open (.txt files only). Another requirement of the application is that all input and operations in the application should have any possible errors handled appropriately.