Answered step by step
Verified Expert Solution
Question
1 Approved Answer
https://prnt.sc/h14qdm There link below the picture is a screenshot of how the format should be. I posted this question before but the answer wasnt with
https://prnt.sc/h14qdm
There link below the picture is a screenshot of how the format should be. I posted this question before but the answer wasnt with the same format and it did not have a do while loop. Please include the do while loop.
Write a program that reads a string from the user then determines and prints the number of vowels (uppercase and lowercase) in the string as well as the number of remaining characters. Your code should also give the user a chance to enter another string by entering yes, or end the program by entering no. Use dialog boxes to read the input and display the output. (Note: Dialog boxes are required for this question) You will need: 1. 2. The jOptionPane class and a string variable. Two string methods - charAt to read each character, and length to return the length of the string 3. A for loop to cycle through the string. The loop should start at the first position (or index) in the string and end when the string is done (i.e. when you have reached the full length of the string. a. Hint: what value is designated for the first position of a string? Use the string method that returns the length as part of your condition. i. ii. b. In this loop you will need one switch statement. This switch statement will use both the fall through method' (for upper and lower case versions of the same vowel, as well as break statements (to separate one vowel from another.) i. Use the string method that returns the character as the expression in your switch statement. 4. Ado while loop to repeat the processStep 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