Question: (Process A Pair of Strings): Write a program in Java that prompts the user to enter two (2) strings, and displays the following information from
(Process A Pair of Strings): Write a program in Java that prompts the user to enter two (2) strings, and displays the following information from the entered pair of strings:
- the number of vowels in each of the two (2) input strings
- the number of consonants in each of the two (2) input strings
- the number of upper case letters letters in each of the two (2) input strings
- the number of lower case letters in each of the two (2) input strings
- the largest common prefix of the two (2) input strings
Enter first string: Welcome to Java
The number of vowels in first string is 6
The number of consonants in first string is 7
The number of upper case letters in first string is 2
The number of lower case letters in first string is 11
Enter second string: Welcome
The number of vowels in second string is 3
The number of consonants in second string is 4
The number of upper case letters in second string is 1
The number of lower case letters in second string is 6
The largest common prefix of the two input strings is: Welcome
Enter first string: Atlanta
The number of vowels in first string is 3
The number of consonants in first string is 4
The number of upper case letters in first string is 1
The number of lower case letters in first string is 6
Enter second string: Macon
The number of vowels in second string is 2
The number of consonants in second string is 3
The number of upper case letters in second string is 1
The number of lower case letters in second string is 4
There is no common prefix between the two input strings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
