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).
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).
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.

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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images

Knowledge Booster
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.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education