Question: Part I The program shall ask the computer user to enter: a String s a char c The program shall inspect the strings provided

Part I The program shall ask the computer user to enter: a String s a char c The program shall inspect the strings provided by the computer user, and shall count the number of times the character c appears in the string s. For example: Please enter a string: bananas Please enter a character: a Total number of times: 3 There is a total of 3 a in the string bananas. Your program shall use a loop and a conditional statement to process each character. Part II When you are done, translate your program into a method called countHowMany. The method shall take two parameters, a String s and the character c. The method shall return the total number of times c occurs in s.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
