Question: USE JAVA LANGUAGE 1. Write a method called listUpper() that takes in a list of strings, and returns a list of the same length containing

USE JAVA LANGUAGE

1. Write a method called listUpper() that takes in a list of strings, and returns a list of the same length containing the same strings but in all uppercase form. You can either modify the provided list or create a new one.

Examples:

listUpper(list("a", "an", "being")) -> list("A", "AN", "BEING") listUpper(list("every", "gator", "eats")) -> list("EVERY", "GATOR", "EATS") listUpper(list()) -> list() 

In this format:

public List listUpper(List list) { }

2. Write a method called listSearch() that takes in a target string and a list of other strings. This method returns a (possibly shorter) list containing all of the strings from the original list that themselves contain the target string you are searching for. Check for the target string as a case-sensitive substring of every member of the list. You can either modify the provided list or create a new one.

Examples:

listSearch("a", list("a", "an", "being")) -> list("a", "an") listSearch("ea", list("every", "gator", "eats")) -> list("eats") listSearch("", list("every", "gator", "eats")) -> list("every", "gator", "eats") listSearch("anything", list()) -> list() 

In this format:

public List listSearch(String target, List list) { }

3. Write a method called listLength() that takes in a list of strings and returns a list of their lengths as integers. You must create a new list for your answer.

Examples:

listLength(list("", "a", "ab", "abc")) -> list(0, 1, 2, 3) listLength(list("hello world")) -> list(11) listLength(list()) -> list() 

In this format:

public List listLength(List list) { }

4. Given a string, return a string where every appearance of the lowercase word "is" has been replaced with "is not". The word "is" should not be immediately preceeded or followed by a letter -- so for example the "is" in "this" does not count. (Note: Character.isLetter(char) tests if a char is a letter.)

Examples:

notReplace("is test") -> "is not test" notReplace("is-is") -> "is not-is not" notReplace("This is right") -> "This is not right" 

In this format:

public String notReplace(String str) { }

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