Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes
asked in CSC211_Winter2018 by (8 points)

1 Answer

0 votes

I was trying to give someone else a chance to answer, but here goes.

To write the helper method, the method would have a parameter of type String. Then use a for loop to loop through each index of the String beginning with 0 up to but not including its length. For each index use the charAt method to get the character at that index comparing it to the character you are trying to count. Remember characters are single quotes so something like word.charAt(i) == 'm'. When true, increase a counter whose value is returned after the loop.

answered by (524 points)
...