subject

HELP ASAP PLEASE AP Computer Science (JAVA)

You are working with a team of programmers to write a program for a Wheel of Fortune game. Your task is to write a method that will return how many times a letter is found in a String puzzle. For example, if the puzzle is "Last Minute Gift Shopping" and a player chose the letter "s", the value 2 would be returned.

In another class, you are given the statements

WheelOfFortune puzzle1 = new WheelOfFortunePuzzle("Last Minute Gift Shopping");
String letter = "s";
System. out. println("The letter " + letter + " is found: " + puzzle1.howMany(letter) + " times");

That outputs: The letter s is found 2 times

Fill in the missing code to complete the method howMany() for the WheelOfFortune class:

public class WheelOfFortune
{
private String puzzle;

public WheelOfFortune (String p)
{
puzzle = p;
}

public static howMany(String letter)
{
int count = 0;
for (int i = ; i puzzle. length(); i++)
{
if( .substring(i, i+1).equalsIgnoreCase( ))
{
;

}
}
return ;
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:50
Free points just awnser this. what should i watch on netflix
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
What type of forensic evidence was recovered during the bomb set off at the new mexico facility on the video that was similar to the evidence obtained at the boston bombings and how did the evidence allow the researchers to connect other pieces of evidence to the same bomb?
Answers: 2
question
Computers and Technology, 25.06.2019 02:30
Ahammer should not be applied to the gear shafts of an electric rotisserie because the shafts may be made of
Answers: 1
You know the right answer?
HELP ASAP PLEASE AP Computer Science (JAVA)

You are working with a team of programmers...
Questions
question
History, 17.02.2021 23:10
question
Mathematics, 17.02.2021 23:10
question
History, 17.02.2021 23:10
question
Mathematics, 17.02.2021 23:10
Questions on the website: 13722367