Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that prompts the user to provide a single character from the alphabet. Print Vowel or Consonant, depending on the user input. If

Write a program that prompts the user to provide a single character from the alphabet. Print "Vowel" or "Consonant", depending on the user input. If the user input is not a letter (between a and z or A and Z), or is a string of length >1, print the error message "Input is not a single character".
Vowels are the letters (a, e, o, u, i). Any other letter is a consonant.
The following are 3 sample runs of demonstrate the program:
Sample run 1:
Please enter a single character:
a
Vowel
Sample run 2:
Please enter a single character:
x
Consonant
Sample run 3:
Please enter a single character:
hello
Input is not a single character
Note: Your program should be able to handle upper/lower case characters.
solve with java

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions

Question

List and briefly describe Simons four phases of decision making.

Answered: 1 week ago

Question

Upon what sorts of data do you think these images were based?

Answered: 1 week ago

Question

How is the NDAA used to shape defense policies indirectly?

Answered: 1 week ago

Question

Identify the different methods employed in the selection process.

Answered: 1 week ago

Question

Demonstrate the difference between ability and personality tests.

Answered: 1 week ago