MAKE SURE ITS IN JAVA
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)" value entered. b) Vowel count Prompt the user to enter a word and display the total number of vowels in that word. Also, display how many of each vowel was found. If no vowels are found, display an appropriate message to the user. Assume vowels are A, E, I, O, U, Y (case insensitive). c) Display asterisk design Use a nested for loop to display the asterisk design shown in the sample input/output. d) Exit The program should terminate when the user selects this option ** If the user a selects an invalid menu option, an error message should display. a) Statistics b) Vowel count c) Display asterisk design d) Exit Select one of the above options: a n: 7 Num 1: 12.5 Num 2: -77.2 Num 3:30 Num 4: 302.9 Num 5: -27.44 Num 6: BO Num 7: 4.5 Average: Max: Min: Middle: 46.5 302.9 - 77.2 302.9 a) Statistics b) Vower count c) Display asterisk design d) Exit Select one of the above options: b Enter a word: CDC CDC contains no vowels a) Statistics b) Vowel count c) Display asterisk design d) Exit Select one of the above options: b Enter a word: Encyclopedia Total Vowels: 6 A: E: Enter a word: Encyclopedia Total Vowels: 6 1 2 A: E: I: 0: Y: a) Statistics b) Vowel count c) Display asterisk design d) Exit Select one of the above options: b Enter a word: Aluminum Total Vowels: A: I: U: 1 2 a) Statistics b) Vowel count c) Display asterisk design d) Exit Select one of the above options: Enter a word: Aluminum Total Vowels: A: I U: a) Statistics b) Vowel count c) Display asterisk design d) Exit Select one of the above options: a) Statistics b) Vowel count c) Display asterisk design d) Exit w Select one of the above options: d Terminated