Java Write a program that reads a text file and counts the number of characters, words, sentences, and paragraphs. A blank space or tab character should be used to delimit a word, a period (.) should...

Java Write a program that reads a text file and counts the number of characters, words, sentences, and paragraphs. A blank space or tab character should be used to delimit a word, a period (.) should be used to delimit a sentence, and a newline character should be used to delimit a paragraph. Name the program WordCount and design it to be invoked as follows: WordCount –[c][w][s][p] filename The hyphen (-) in the above syntax is used to denote that counting options will be specified and the square brackets are used to denote counting options. A ‘c’ indicates that a character count should be done, a ‘w’ indicates that a word count should be done, etc. As an example, WordCount –cws myFile.txt indicates that a character count, word count, and sentence count should be done on the file myFile.txt. WordCount –cw myFile.txt indicates that a character count and word count should be done on the file myText.txt. If the program is invoked as WordCount myFile.txt then all counts should be performed.

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here