case 'b' : // prompt the user to enter a word System.out.print("\nEnter a word: "); // String words = sc.next(); String word = sc.next(); // count the number of vowels and how many of each vowel was found int totalVowels = 0; int aCount = 0; int eCount = 0; int iCount = 0; int oCount = 0; int uCount = 0; int yCount = 0; for (int i = 0; i < word.toLowerCase().length(); i++) { char vowel = word.toLowerCase().charAt(i); if (vowel == 'a') { totalVowels++; aCount++; } else if ( vowel == 'e') { totalVowels++; eCount++; } else if ( vowel == 'i') { totalVowels++; iCount++; } else if ( vowel == 'o') { totalVowels++; oCount++; } else if (vowel == 'u') { totalVowels++; uCount++; } else if ( vowel == 'y') { totalVowels++; yCount++; } } // display the results if (totalVowels == 0) { System.out.println("\n" + word +" contains no vowels"); } else { System.out.printf("\n%-25s %d \n\n" , "Total Vowels: " , totalVowels); if (aCount != 0) { System.out.printf("%-25s %d \n" , "A: " , aCount); } if (eCount != 0) { System.out.printf("%-25s %d \n" , "E: " , eCount); } if (iCount != 0) { System.out.printf("%-25s %d \n" , "I: " , iCount); } if (oCount != 0) { System.out.printf("%-25s %d \n" , "O: " , oCount); } if (uCount != 0) { System.out.printf("%-25s %d \n" , "U: " , uCount); } if (yCount != 0) { System.out.printf("%-25s %d \n" , "Y: " , yCount); } } break; // --------------------------------------------------------------------------------------- case 'c' : System.out.print("\n"); // number of spaces in the design int space = 5; // loop through each row for (int i = 1; i <= space; i++) { // print spaces before asterisks for (int j = 1; j <= space - i; j++) { System.out.print(" "); } for (int k = 1; k <= i; k++) { // print asterisks System.out.print("*"); } System.out.println(); } break; // --------------------------------------------------------------------------------------- case 'd' : // ending the program System.out.println("\nTerminated"); break; // --------------------------------------------------------------------------------------- default : // error message System.out.println("\n<< ERROR !! >>\n<< Please select the correct option >>"); } // --------------------------------------------------------------------------------------- System.out.print("\n---------------------------------------------------------------------------------- -----"); } } } CAN YOU CHECK THIS CODE. ITS IN JAVA. PURPOSE This assignment will enhance your ability to utilize loops in a computer program. By the end of this assignment, you should feel comfortable working with while loops, for loops, and nested loops. PROBLEM Write a program that repeatedly displays a menu to the screen until the user exits the program. The menu options are listed below a) Statistics Prompt the user to enter an integer called n. Then repeatedly prompt the user to enter n values that are of type double. Display the average, maximum, minimum, and middle value. Assume the middle value is the ((n+1)/2)th value ent.