Coding translating program?

I am having trouble combining these 2 steps as everything I have tried coding just is not seem to be working.

1.Add code to the a method so that when pressed it reads in any user input from the input field and breaks it into pieces, looping over each separate “word” (where here this just means some chunk of text separated from the rest by white space). Test your code by having your loop use System.out.println() to display each word separately; if it is working correctly, then entering input This is awesome! will produce console output:

This 

is 

awesome!

2.When the code for the previous step is working properly, remove the println() statement, and replace it with code that instead:

(a) Converts each word to lower-case.

(b) Generates an Ubbi Dubbi version of the word typed.

https://en.wikipedia.org/wiki/Ubbi_dubbi

The rules for the version of Ubbi Dubbi that we will use are: • Any sequence of vowels (‘a’, ‘e’, ‘i’, ‘o’, ‘u’) has the syllable “ub” added before them. (We will treat any occurrence of the ‘y’ as a consonant, since that is sometimes true.) • Any other letter or punctuation is ignored and left alone. Thus, the word “you” becomes “yubou,” and the word “seeking” becomes “subeekubing.” To complete this step, you will be using conditionals, loops, and basic String methods.

When the above process is complete, entering input This is awesome! will produce the following output:

thubis ubis ubawubesubomube!

Update:

in java.

1 Answer

Relevance
Still have questions? Get your answers by asking now.