Question: Java 1. Write a function that takes a string as a parameterlargument. The function should count all the vowels O, U) in the string and

Java  Java 1. Write a function that takes a string as a

1. Write a function that takes a string as a parameterlargument. The function should count all the vowels O, U) in the string and return the total. Count both uppercase and print the total in main. For example: and lowercase vowels. Call this function from main // Problem #1-Count Vowels intVowelCount- CountVowelsinString( "I Love Java"); System.out printin( "Vowel Count+intVowelCount ) ll Should return 5 2. Write a function that takes a string and a character as parameters/arguments. The function should return the Check both uppercase and lowercase letters. Call index of the first occurrence of the character in the string. this function from main and print the index in main. Return -1 if the letter is not in the string. F // Problem #2-Find Letter intLetterindex = FindLetterinString("I Love Java ", "I' ); System.out printin( "Letter index-"+intLetterlndex ): l Should return 7: index of first

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!