Question: a. Make an application that accepts up to 10 Strings, or fewer if the user enters a terminating value. Divide the entered Strings into two

a. Make an application that accepts up to 10 Strings, or fewer if the user enters a terminating value. Divide the entered Strings into two listsone for short Strings that are 10 characters or fewer and the other for long Strings. After data entry is complete, prompt the user to enter which type of String to display, and then output the correct list. For this exercise, you can assume that if the user does not request the list of short strings, the user wants the list of long strings. If there are no Strings in a requested list, output an appropriate message. Prompt the user continuously until a sentinel value is entered.

b. Modify the application above to divide the entered Strings into those that contain no spaces, one space, or more. After data entry is complete, continuously prompt the user to enter the type of String to display. If the user does not enter one of the three valid choices, display all of the Strings.

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 Programming Questions!