Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Method vowelCount: Write a static method named vowelcount that accepts a String as a parameter and produces and returns an array of integers representing the
Method vowelCount:
Write a static method named vowelcount that accepts a String as a parameter and produces
and returns an array of integers representing the counts of each vowel in the string. The
array returned by your method should hold elements: the first is the count of As the second
is the count of Es the third is the count of Is the fourth is the count of Os and the fifth is the
count of Us You may assume that the string contains no uppercase letters.
Examples:
vowelCount homework returns
vowelCount sun
goes down early" returns
vowelCount fly returns
Note : You can use the above examples in your main to check the methods works as intended.
Note : You can assume a legit input to the method, so no need to check for input correctness.
Tip : This method returns things, that means to check it you need to call it and store or print
result.
Tip : When working with Strings methods like chartAti and length can be useful.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started