Question: using Dr java Objective: Write a program that takes a phrase and then counts the number of vowels (case does not matter) in the phrase.

using Dr java

Objective:

Write a program that takes a phrase and then counts the number of vowels (case does not matter) in the phrase. It then should display all of the vowels in sorted ascending order according to their count. Only consider {AEIOU} as the vowels.

Hint:

It may be a good idea to keep track and sort two arrays:

Has the vowels in alphabetic order Has the number of said vowels

Whenever one would swap then it swaps the values in both arrays.

Example Dialog:

Welcome to the vowel counter and sorter!

Enter a phrase!

aaaaaeeeeiiioou

The vowels and their count

u 1

o 2

i 3

e 4

a 5

Another Example

Welcome to the vowel counter and sorter!

Enter a phrase!

Facetious is the only word in English that contains all vowels in order!

The vowels and their count

u 1

a 4

e 5

i 6

o 6

Yet another Example

Welcome to the vowel counter and sorter!

Enter a phrase!

I have a pen, I have an apple. Uh! Apple Pen I have a pen, I have pineapple. Uh! Pineapple Pen Apple pen... Pineapple pen... uh! Pen Pineapple Apple Pen! Pen Pineapple Apple Pen

The vowels and their count

o 0

u 3

i 9

a 17

e 29

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!