I'm working on a assignment in my com s class which requires me to create a wheel of fortune game. I'm currently working on the getDisplayedPhrase
method which I will explain. So for this program I have a random phrase for example
"this is a question, thanks for helping!"
I want this phrase to change to
"**** ** * ********, ****** *** *******!"
This is how the phrase should look like before they guess it. As you can see I'm trying to only change the letters so I created a
private static final String alpha ="abcdefghijklmnopqrstuvwxyz"
to avoid any punctuation. This is what I have so far:
public String getDisplayedPhrase() {
for (int i = 0; i<secretPhrase.length(); i++){
I don't know what to put here and what method to use???
I'm thinking of using charAt() or indexOf()
}
return displayedPhrase;
}