Reference no: EM132200503
Question :
Write a Java console application that analyzes a paragraph for readability using the Coleman-Liau index.
Prompt the user for a paragraph, and then calculate and show the following:
Number of characters.
Number of whitespace characters.
Number of non-whitespace characters.
Number of sentences - these are delimited by periods (.).
Number of words - these are delimited by one or more spaces, commas, and periods.
Number of word letters.
Coleman-Liau index - this is calculated as follows:
1) Count the number of sentences.
2) Count the number of words.
3) Count the number of letters in words.
4) Calculate L = Letters ÷ Words × 100.
5) Calculate S = Sentences ÷ Words × 100.
6) Calculate CLI = 0.0588L - 0.296S - 15.8.