Practice Problem Word Morph

<< Roll Your Own | OtherProjectsTrailIndex | Practice Problem 2SplitDiff >>

A word morph takes the first part of one word and attaches it to the rest of another word. For example "breakfast" and "lunch" is morphed into "brunch".

If you switched the order, it would be "leakfast"

Part (a)

Make a method firstVowel(String s) which will return the index of the first vowel of a word

Part (b)

Make a method that uses firstVowel() to return a morph of two words.

Starter Code

public class MorphTester {

	public static int firstVowel(String s)
		/* part (a) */
	public static String morph(String s1, String s2)
		/* part (b) */
	public static void main(String[] args)