Should would i turn the following code:
import java.awt.*;
import java.io.*;
import java.util.StringTokenizer;
public class ex74
{
public static void main(String[] args) throws IOException
{
Frame f = new Fram();
String sent;
StringTokenizer st;
BufferedReader br = new
BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter a sentence: ");
sent = br.readLine();
sent = sent.toLowerCase();
st = new StringTokenizer(sent, " ,.?!;");
while (st.hasMoreTokens())
{
plw(st.nextToken());
System.out.print(' ');
}
System.out.println();
}
public static void plw(String word)
{
int x;
for (x = 1; x < word.length(); x++)
System.out.print(word.charAt(x));
System.out.print(word.charAt(0) + "ay");
}
}
into a program that uses a from for the input. When they enter the sentance the results end up on the output screen.