Question: Create a class called StringManipulator. Create a single instance variable of type String for this class called line. (Because it will store a line of

Create a class called StringManipulator. Create a single instance variable of type String for this class called line. (Because it will store a line of text). Create a constructor for this class that accepts a single parameter as a String and initializes the instance variable line to this parameter. In the main method of your tester class, you will prompt the user for a line of text as a String (you can use the nextLine() method from the Scanner class), and use this String to construct a new StringManipulator object. Then you will call your methods. Use the following method names for each part of the problem. A) printUpper(), B) printEveryOther(), C) vowelsToUnderscore(), D) printVowelCount(), E) printVowelPositions(). These methods should each print the solution to each part of the problem, using the instance variable line for the calculations.

 Create a class called StringManipulator. Create a single instance variable of

E6.3 Write programs that read a line of input as a string and print a. Only the uppercase letters in the string. b. Every second letter of the string. c. The string, with all vowels replaced by an underscore. d. The number of vowels in the string. e. The positions of all vowels in the string

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