Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started