Java Reference
In-Depth Information
cat = atcay
dog = ogday
simply = implysay
noise = oisenay
For words that begin with double or multiple consonants, take the group of consonants
off the front of the word and add them to the end, adding “ay” at the very end of the word.
Here are some examples.
scratch = atchscray
thick = ickthay
flight = ightflay
grime = imegray
For words that begin with a vowel, just add “yay” at the end.
is = isyay
apple =appleyay
under = underyay
octopus = octopusyay
Recall that a, e, i, o, u, and y are the vowels in the Latin alphabet.
Your program should read a sentence from the keyboard, convert it to Pig Latin,
and then output it. Use a StringTokenizer to parse the sentence. Use an ArrayList
of StringBuffer objects to store the words.
Search WWH ::

Custom Search