Question: Write a program that reads in a sequence of strings ( using nextLine and a header value ) from the file strings.text, and prints out
Write a program that reads in a sequence of strings using nextLine and a header value from the file strings.text, and prints out various properties and manipulations of the individual strings. The program should also sort the strings and print them out in sorted order. This exercise is similar to Lab
As each string is read in you should print out:
the original string
the string in reverse; call a method that reverses it String parameter, returning the result as the return value
a string resulting from removing all the vowels of its string parameter; again use a method that accepts a String and returns the String without vowels
a string representing the plural of its string parameter. For the purpose of this exercise, the plural of a word is either:
The word followed by an s if the word does not end with an s or
The word followed by an es if the word ends with an s
Again, call a method that returns the plural of its String parameter
whether the string is capitalized
whether the string contains any blanks
Once the strings have been read in they should be sorted and the result printed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
