Free-Response Question 1: Methods and Control Structures. Students will write two methods or one constructor and one method of a given class based on the provided specifications and examples. In Part A (4 points), the method or constructor will require students to write iterative or conditional statements, or both, as well as statements that call methods in the specified class.
You are working on a text-analysis tool. The StringProcessor class contains a helper method, isVowel(String letter), which returns true if a single-character string is a vowel (A, E, I, O, U, case-insensitive) and false otherwise.
Subsection15.5.4String Algorithm - Make Abbreviation
Activity15.5.2.
Write a method called makeAbbreviation that takes a multi-word String and returns a new String consisting of the first letter of each word in uppercase.
Write a method called maskVowels that takes a String and returns a new String where all vowels are replaced with asterisks (*), but only if the String is longer than 3 letters.
Be careful! It is easy to end up with an infinite loop if you are not careful when updating your loop variable. You will need to use the indexOf method to find the next occurrence of the target string, and then update your loop variable to start searching for the next occurrence after the current one.