Question: Write a program which reads two Strings of any length from the console and displays the following information about the strings: bullet Display the number

 Write a program which reads two Strings of any length from

Write a program which reads two Strings of any length from the console and displays the following information about the strings: bullet Display the number of characters in each String. bullet Display whether the first string is a substring of the second. If the first string is a substring of the second, display where the string appears (in the beginning, middle, or end). bullet Display whether the second string is a substring of the first. If the second string is a substring of the first, display where the string appears (in the beginning, middle, or end). bullet Display if the two strings are equal or not. If the two strings are not equal, say whether or not the first string is alphabetically less than or greater than the second string. Input Validation: bullet No validation required. Requirements: bullet All comparisons must ignore the case of the string. Sample Output 1: Enter the first string: abcde Enter the second string: abcde "abcde" has 5 characters. "abcde" has 5 characters. "abcde" is a substring of "abcde" and appears at the beginning, middle, and end of the string. "abcde" is a substring of "abcde" and appears at the beginning, middle, and end of the string. "abcde" and "abcde" are equal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!