about | help | code help+videos | done | prefs |
Write the method called “hangMan3”. This method receives a string and returns a String where each vowel is displayed and all other characters have been replaced with a hyphen. Given: I Love Java this would return i -o-e -a-a DO NOT USE THE UNDERSCORE. We will assume the words are separated by just one space. No beginning space, BUT there will always be an ending space character. Ignore case - change every phrase to lower case. Extra challenge: Use a boolean "helper" method to test for vowels. (ie: a, e, i, o, u) hangMan3("I Love Java") → "i -o-e -a-a" hangMan3("Math Is For Champions") → "-a-- i- -o- --a--io--" hangMan3("What a good day") → "--a- a -oo- -a-" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy