JAVA Assignment:
Project File Processing.
Write a program that will read in from input file one line at atime until end of file and output the number of words in the lineand the number of occurrences of each letter. Define a word to beany string of letters that is delimited at each end by eitherwhitespace, a period, a comma or the beginning or end of the line.You can assume that the input consists entirely of letters,whitespaces, commas and periods. When outputting the number ofletters that occur in a line, be sure to count upper and lowercaseversions of a letter as the same letter. Output the letters inalphabetical order and list only those letters that do occur in theinput line. For example, the input line:-I say HI should produceoutput similar to the following:-
3 words
1 a
1 h
2 i
1 s
1 y
Please Note!!!!!: in addition to the above,output the result to file named “result.txt”