Write a program that prompts the user to input a sequence of characters and outputs the number of vowels. (Use the function is Vowel written in Programming Exercise 2.) Solution VowelTest.java import java.util.Scanner; public class VowelTest { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = new Scanner(System.in); System.out.println(\"Please enter the sequence of characters :\"); String s = scan.nextLine(); boolean status = false; int vowelCount = 0; for(int i=0; i<s.length(); i++){ status = isVowel(s.charAt(i)); if(status == true){ vowelCount++; } } System.out.println(\"The Number of Vowels : \"+vowelCount); } public static boolean isVowel(char c){ boolean status = false; char vowels[] = {\'a\',\'e\',\'i\',\'o\',\'u\',\'A\',\'E\',\'I\',\'O\',\'U\'}; for(int i=0; i<vowels.length; i++){ if(vowels[i] == c){ status = true; break; } } return status; } } Output: Please enter the sequence of characters : Hai Good Morning The Number of Vowels : 6 .