Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java !!!! plz!!!! Count the number of vowels in the array of characters In the English language, a letter representing a vowel sound includes a,

image text in transcribed

Java !!!! plz!!!!

Count the number of vowels in the array of characters

In the English language, a letter representing a vowel sound includes a, e, I, o, u. Write a method called countVowels that takes an array of characters as a parameter and returns the number of times that a lowercase vowel occurs (i.e. an 'a', 'e', 'i', 'o', or 'u').

countVowel({'i','c','e','c','r','e','a','m'}) -> 4 countVowel{'t','o','w','e','l'}) -> 2 countVowel({'r','y','t','h','m'}) -> 0

 

1

public int countVowel(char[] str)

2

{

3

 // TO DO: Write your code here.

4

 // Hint: You can loop through the array of characters and count occurences

5

 // of letters representing vowels.

6

}

Count the number of vowels in the array of characters In the English language, a letter representing a vowel sound includes a, e, i, o, u. Write a method called countVowels that takes an array of characters as a parameter and returns the number of times that a lowercase vowel occurs (i.e. an 'a', 'e', 'i', 'o', or 'u'). countVowel({'T', 'c', 'e','c','d', 'e', 'a', 'm')) -> 4 countVowelt','o', 'w', 'e', '1'}) -> 2 countVowel({'T','y', 't','h', 'm'}) -> 0 3 1 public int countVowel (char[] str) 2 { // TO DO: Write your code here. // Hint: You can loop through the array of characters and count occurences 5 // of letters representing vowels. 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

reference your work in a credible way.

Answered: 1 week ago