Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help writing this code in java. Part 2 (5 pts) - Now, ask the user for five animals. Store the answers in a

I need help writing this code in java.

Part 2 (5 pts) - Now, ask the user for five animals. Store the answers in a new String array. Then, display the animal names in alphabetical order, along with their vowel counts (just consider a,e,i,o,u as vowels for now). Additional requirements: As part of your solution, you must create a static method called vowelCount that takes an animal name as a single String parameter. The method will return the number of vowels found in the String provided. You must call this method from main to obtain the vowel counts you will display. As usual, refer to the Sample Output to clarify the required output of your program.

image text in transcribed

Now, let's talk about animals... Name five animals: Animal 1: zebra Animal 2 horse Animal 3 platypus Animal 4 duck Animal 5 aardvark Your animals, in alphabetical order, are aardvark, which contains 3 vowels duck, which contains vowels horse, which contains 2 vowels platypus, which contains 2 vowels zebra, which contains 2 vowels BUILD SUCCESSFUL (total time 38 seconds)

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

Entity Alignment Concepts Recent Advances And Novel Approaches

Authors: Xiang Zhao ,Weixin Zeng ,Jiuyang Tang

1st Edition

9819942527, 978-9819942527

More Books

Students also viewed these Databases questions