Question: PLEASE DONT USE ARRAYS. You are given a long text to analyze it. You are asked to implement a Java program called TextStatistics.java that computes

PLEASE DONT USE ARRAYS.

 PLEASE DONT USE ARRAYS. You are given a long text to

You are given a long text to analyze it. You are asked to implement a Java program called TextStatistics.java that computes some word statistics Given a text, you will compute: The number of sentences The number of words The greatest word of the whole text ("Troy" is same with "troy", but it is greater than "asia".) The smallest word of the whole text ("asia" is smaller than "troy".) The number of words with 1-2-3-4-5-more characters . Your program gets a text as an input from the user and returns the statistics as below. Assume that the text entered has at least one sentence, each ending with a period ("."), and each sentence includes at least one word. The greatest and the smallest words will be printed in lower case (e.g., The greatest word you) The sample outputs of the program are as below Sample Outputs: Enter a text: You are given a short text The # of sentences : 1 The # of words :6 The greatest word :you The smallest word :a The # of words with 1 char :1 The # of words with 2 char :0 The # of words with 3 char :2 The # of words with 4 char :1 The # of words with 5 char :2 The # of words with >5 char:0 Enter a text: Troy was a city situated in the far northwest of the region known in late Classical antiquity as Asia Minor now known as Anatolia in modern Turkey. The present-day location is known as Hisarlik. It was the setting of the Trojan War described in the Greek Epic Cycle in particular in the Iliad one of the two epic poems attributed to Homer The # of sentences :3 The # of words :62 The greatest word :was The smallest word:a The # of words with 1 char :1 The # of words with 2 char :15 The # of words with 3 char : 15 The # of words with 4 char :6 The # of words with 5 char :9 The # of words with >5 char: 16

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!