Next: GUI Specifications
Up: In the Laboratory: Pig
Previous: In the Laboratory: Pig
Write a Java applet that translates an English sentence or expression
into Pig Latin . The rules of Pig Latin are
- If the word begins with a consonant -- such as ``string,'' ``Latin'' --
divide the word at the first vowel, swapping the front and back
halves and append ``ay'' to the word -- ``ingstray,'' ``atinLay.''
- If the word begins with a vowel -- such as ``am,'' ``are,'' ``i'' -- append
``yay'' to the word -- ``amyay,'' ``areyay,'' ``iyay.''
- If the word has no vowels (other than 'y') -- such as ``my,'' ``thy'' --
append ``yay'' to it -- ``myyay,'' ``thyyay.''
Ralph Morelli {Faculty}
12/22/1999