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 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. andre was recently hired by an organization to check for system vulnerabilities. he is supposed to exploit these vulnerabilities and create a report on the extent of damage to which the system was susceptible. what position does andre hold in this organization? a. information security analyst b. information assurance manager c. penetration tester d. network security engineer e. chief information security officer
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
You know the right answer?
HELP ASAP PLEASE AP Computer Science (JAVA)

You are working with a team of programmers...
Questions
question
Mathematics, 05.03.2022 14:00
question
Mathematics, 05.03.2022 14:00
question
Business, 05.03.2022 14:00
question
Mathematics, 05.03.2022 14:00
Questions on the website: 13722361