Question: use only basic loops (do while/for loop) (not nested) Read this entire document before beginning your lab. The Comp248LabManual is available on the Lab page
Read this entire document before beginning your lab. The Comp248LabManual is available on the Lab page of the course website if you don't remember how to use the PC2 lab system, you should worry about this after completing the question. For this lab you are required to fulfill all requirements exactly as described in this provided document, no less, no more. Question: Today you are to write a Java program that will prompt for and read 1 string entered by the user which may contain spaces, and display just the vowels in the string in the order they appear, and all other characters in the order they appear. Be sure to use the same format and wording as in the sample runs in the table below. The vowels are a,e,i,o and u. You can use the loop of your choice to solve the problem. The box below illustrates how your program should behave and appear. REMEMBER in the output: is a space and . is a new line. Text in green is user input Note 1: You are to expect a perfect user who will always enter a string in lower case; that is, do not verify the validity of user input. Note 2: The use of libraries other than java.util.Scanner is prohibited. Your program must work for any strings entered, not just the ones in the samples above. Note 3: Final thought, remember that your solution is case-sensitive and space-sensitive and fulfill the above instructions carefully and precisely. Reminder: When submitting your solution to the lab system, make sure that if you have a package statement at the top of your . java file it is commented out (has // in front of it) as failing to do so will result in a Compilation Error hence a grade of 0 (restriction of the PC2 system)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
