Java - write obenglobish method
<p>I have problem writing some method ... so if some1 can help, i would really appreciate it. Thank you.</p>

<p><strong>Task:</strong>
- read word
- turn it in "obenglobish" - that means that you must add "OB" before vowel ...
for example: english will become --> OBenglOBish ...
<strong>exception</strong>: two vowel in the row &amp;&amp; -e is the last char in the word.</p>

<p>This is what i wrote, no matter on exceptions:</p>

<pre><code>    import acm.program.*;

public class ObenGlobishX extends ConsoleProgram {
    public void run() {
        println("OBENGLOBISH");
        while (true) {
            String word = readLine("Enter a word: ");
            if (word.equals("")) break;
            println(word + " --&gt; " + obenglobish(word));
        }
    }

    private String obenglobish (String word) {
        String result = "";
        for (int i = 0; i &lt; word.length(); i++) {
            char c = word.charAt(i);
            if (isEnglishVowel(c)) result = result + "ob" + c;
            else result += c;
        }
        return result;
    }

    private boolean isEnglishVowel(char x) {
        if (x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u') return true;
        return false;
    }

}
</code></pre>

<p>It works for word like English and Rot (robot), but for word gooiest it doesn't work - two oo's ... need to find out how to modify method to get correct results ... that means:
gooiest -> gobooiest
amaze -> obamobaze 
etc.</p>

<p>THX</p>
