Question
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.
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
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