import java.lang.String; public class Flesch { public Flesch() // Constructor does nothing (no private data) {} public int readWords(String filename) // Purpose: Determine the number of words in a text passage. // Precondition: filename contains the name of a file that exists // in the current folder // Postcondition: return the number of words in the passage { // *** TO DO *** } public int readSentences(String filename) // Purpose: Determine the number of sentences in a text passage. // Precondition: filename contains the name of a file that exists // in the current folder // Postcondition: return the number of sentences in the passage { // *** TO DO *** } public int readSyllables(String filename) // Purpose: Determine the number of syllables in a text passage. // Precondition: filename contains the name of a file that exists // in the current folder // Postcondition: return the number of syllables in the passage { // *** TO DO *** } public int fleschReadability (int words, int sentences, int syllables) // Purpose: This method computes the Flesch Readablity Index based on the // number of words, sentences, and syllables in the passage. // Precondition: words contains the number of words in the passage // sentences contains the number of sentences in the passage // syllables contains the number of syllable in the passage // Postcondition: The reading index has been computed, rounded, and returned. { // *** TO DO *** } public String readingLevel(int index) // Purpose: This method translates the Flesch Readability index to // a reading level. // Precondition: index is an positive integer // Postcondition: the reading level of the passage is returned as a String. { // *** TO DO *** } }