Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Must be written in java: After completion of this lab, you should be able to: 1. Produce and return an array from a method. Write

Must be written in java:

After completion of this lab, you should be able to: 1. Produce and return an array from a method. Write a Java class to represent Vowels 1. Create a new Java class named Vowels In the Vowels class write a static method countVowels that accepts a String as a parameter and produces and returns an array of integers, which will represent the count of each vowel in the string. The array returned by your method should hold 5 elements: 1 st index tracks of how many As, the 2 nd tracks how many Es, 3 rd tracks how many Is, the 4 th tracks how many Os, 5 th tracks how many Us. Assume that string will contain all lowercase letters. Dont forget to test your class.

Example output:

Vowels.countVowels(good morning ap comp sci); returns an array with: 1 0 2 4 0

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

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

You use the operator to reverse the meaning of a bollean expression

Answered: 1 week ago