Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a method called vowelCount that accepts a String as a parameter and produces/returns an array of integers representing the count of each vowel in

Create a method called vowelCount that accepts aStringas a parameter and produces/returns an array of integers representing the count of each vowel in the String.The array returned by your method should hold five elements: the first is the count of the 'A's, the second is the count of 'E's, the third 'I''s, the fourth 'O's and the fifth the number of 'U's.Your count should check for both upper and lower case versions.

For example the callvowelCount("I think therefore I am")should return the array[1,3,3,1,0].

Your main program should then allow the user to type insingle lines,analyzing each line and print out its count.The program should stop when the user types the word "STOP" by itself.

  • Make sure to count all the vowels,both uppercase vowels and lowercase vowels.
  • The main should print
  • The method itself should not print anything.
  • Return an array from the method.

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_2

Step: 3

blur-text-image_3

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

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions

Question

=+Do the key operating policies address the goals?

Answered: 1 week ago

Question

What is Taxonomy ?

Answered: 1 week ago

Question

1. In taxonomy which are the factors to be studied ?

Answered: 1 week ago

Question

1.what is the significance of Taxonomy ?

Answered: 1 week ago

Question

What are the advantages and disadvantages of leasing ?

Answered: 1 week ago