Note that there are some explanatory texts on larger screens.

plurals
  1. POConverting English to Ubbi Dubbi
    primarykey
    data
    text
    <p>Hey guys i have to make a a application that converts UbbiDubbi to English. I am going to start out by explaining UbbiDubbi its not the normal way UbbiDubbi works, instead we are only adding ub in front of a vowel or a vowel cluster (cluster being no more then 2 vowels together). I almost have it im stuck on two parts oneit will add the first vowel but not any other vowels in the String/Word. and two it runs the program over and over.</p> <pre><code> public static String translateFromEnglish(String phrase) { Scanner scan = new Scanner(System.in); System.out.println("type in a phrase you would like to convert to Ubbi Dubbi"); phrase = scan.nextLine(); String Emptystring = ""; for (int i = 0; i &lt; phrase.length(); i++) { if (phrase.charAt(i) == 'a' || phrase.charAt(i) == 'e' || phrase.charAt(i) == 'i' || phrase.charAt(i) == 'o' || phrase.charAt(i) == 'u') { Emptystring += "ub"; Emptystring += phrase.charAt(i); // +ub // +a if (phrase.charAt(i+1) == 'a'){ Emptystring += phrase.charAt(i+1); // +a // i +1 } else { if (phrase.charAt(i+1) == 'e') { Emptystring += phrase.charAt(i+1); } } if (phrase.charAt(i+1) == 'i'){ Emptystring += phrase.charAt(i+1); }else { if (phrase.charAt(i+1) == 'o'){ Emptystring += phrase.charAt(i+1); } } if (phrase.charAt(i+1) == 'u') { Emptystring += phrase.charAt(i+1); } } else { Emptystring += phrase.charAt(i); } // here i am check to see if the String contains any vowels or vowel // clusters // here i printed out the new word } System.out.println(Emptystring); return phrase; } </code></pre> <p>Console type in a phrase you would like to convert to Ubbi Dubbi Hello your new Phrase is Hell error</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload