The box below illustrates how your program should behave and appear. REMEMBER in the output: • is a space and J is a new line. Text in green is user input Enter a sentence• (in•lower•case):J springo break is•over!J List•of vowels:•ieaioe. List•of•other•characters: sprng•brk°s°vr! Enter a•sentence• (in•lower•case):J this is lab 4J List of vowels:•iiaJ List•of otherocharacters: ths°s•lb•4 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).

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question
Question: You are to write a Java program correctly 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 J is a new line. Text in green is user input
Enter a sentence• (in•lower•case):J
springo break °is•over!.J
List•of vowels: ieaioe.J
List•of•other°characters: sprng• brkos vr!
Enter•a sentence • (in•lower case):J
this is lab 4J
List•of vowels:•iiaJ
List•of other•characters: thsos•lb•4
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 PC? system).
Transcribed Image Text:The box below illustrates how your program should behave and appear. REMEMBER in the output: • is a space and J is a new line. Text in green is user input Enter a sentence• (in•lower•case):J springo break °is•over!.J List•of vowels: ieaioe.J List•of•other°characters: sprng• brkos vr! Enter•a sentence • (in•lower case):J this is lab 4J List•of vowels:•iiaJ List•of other•characters: thsos•lb•4 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 PC? system).
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Greatest Common Divisor
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning