I need to process a sentence and input and letter which will have to be counted at end how many times its used and needed to show what kind of sentence and show shortest word and longest and how many short mid and long words there are sorry thats its alot to ask.
import java.util.StringTokenizer;
public class prog4
{
//-----------------------------------------------------------------
// Processes number of characters shortest word longest word etc.
//
//-----------------------------------------------------------------
public static void main (String[] args)
{
//Initialize Declare
InputStreamReader isr = new InputStreamReader(system.in);
BufferedReader br = new BufferedReader(isr);
final int char = 27;
int 1 = statement.length();
int oneWord
int currentchar, letter, statement, longest, shortest, letter;
double ShortWords, MediumWords, LongWords;
int length();
//Input Data
System.out.println ("Enter a Letter:"
letter=br.readLine();
System.out.println ("Enter a statement:"
statement=br.readLine();
if (statement.charAT(statement.length()-1)=="."
System.out.println ("A sentence"
Else;
if (statement.charAT(statement.length()-1)=="!"
System.out.println ("A Exclamation"
Else;
if (statement.charAT(statement.length()-1)=="?"
System.out.println ("A Question"
StringTokenizer st = new StringTokenizer(statement);
oneWord=st.nextToken();
if (oneWord.length()<shortest.length());
oneWord=st.nextToken();
String shortest = new String(oneWord);
String longest = new String(oneWord);
if(!st.hasMoreTokens());
oneWord=oneWord.substring(0,oneWord.length()-1);
if (oneWord.length()<=4)
ShortWords++;
System.out.println ("Number of short word: " (ShortWords));
if (oneWord.length()<=7);
MediumWords++;
System.out.println ("Number of medium word: " (MediumWords));
if (oneWord.length()>7);
LongWords++;
System.out.println ("Number of long word: " (LongWords));
import java.util.StringTokenizer;
public class prog4
{
//-----------------------------------------------------------------
// Processes number of characters shortest word longest word etc.
//
//-----------------------------------------------------------------
public static void main (String[] args)
{
//Initialize Declare
InputStreamReader isr = new InputStreamReader(system.in);
BufferedReader br = new BufferedReader(isr);
final int char = 27;
int 1 = statement.length();
int oneWord
int currentchar, letter, statement, longest, shortest, letter;
double ShortWords, MediumWords, LongWords;
int length();
//Input Data
System.out.println ("Enter a Letter:"
letter=br.readLine();
System.out.println ("Enter a statement:"
statement=br.readLine();
if (statement.charAT(statement.length()-1)=="."
System.out.println ("A sentence"
Else;
if (statement.charAT(statement.length()-1)=="!"
System.out.println ("A Exclamation"
Else;
if (statement.charAT(statement.length()-1)=="?"
System.out.println ("A Question"
StringTokenizer st = new StringTokenizer(statement);
oneWord=st.nextToken();
if (oneWord.length()<shortest.length());
oneWord=st.nextToken();
String shortest = new String(oneWord);
String longest = new String(oneWord);
if(!st.hasMoreTokens());
oneWord=oneWord.substring(0,oneWord.length()-1);
if (oneWord.length()<=4)
ShortWords++;
System.out.println ("Number of short word: " (ShortWords));
if (oneWord.length()<=7);
MediumWords++;
System.out.println ("Number of medium word: " (MediumWords));
if (oneWord.length()>7);
LongWords++;
System.out.println ("Number of long word: " (LongWords));