Description: In "The Adventure of the Dancing Men," Mr. Sherlock Holmes was asked by a Mr. Hilton Cubitt of Riding Thorpe Manor, Norfolk, to deduce the meaning of his wife's strange behavior, which seemed to stem from several notes left on the sundial in their garden. The notes contained drawings of stick figures, little dancing men in a variety of positions.
After accumulating a number of these notes, Holmes concluded that they were a substitution cipher of some sort. Since Holmes was "fairly familiar with all forms of secret writings, and [was himself] the author of a trifling monograph upon the subject," he had no difficulty in breaking the code. He cracked the code by using frequency analysis. (see http://www.dcode.fr/dancingmen-cipher) Holmes' solution used the frequencies with which the 26 letters of the English alphabet appear in normal prose. Write a Java program which will tally letter frequencies in any plain text file a user wants. Find and use an appropriate Collections data structure to store letters and the number of occurrences.
Your program should prompt the user to enter a filename, open the file, scan the text character-by-character, and count the occurrences of each of the 26 letters. You should not distinguish between upper and lower case letters, and punctuation should be ignored.