Question: Model.java 1 package code; 3e import java.util.ArrayList;D 6 public class Model 8 The game will use a dictionary of words 10 *The starter words' are

 Model.java 1 package code; 3e import java.util.ArrayList;D 6 public class Model8 The game will use a dictionary of words 10 *The starterwords' are all supposed to be of a certain length In the

Model.java 1 package code; 3e import java.util.ArrayList;D 6 public class Model 8 The game will use a dictionary of words 10 *The starter words' are all supposed to be of a certain length In the TextTwist2 game the starter words' are all of length 12 13 *Write a method that takes in an ArrayList called list and *an int named length and returns a new ArrayList public ArrayListString filterWordsForLength(ArrayListString words, int length) { ArrayList answer-new ArraylistO /1 put your code here return answer; 28 30 316> /* This method accepts a String as input and returns an ArrayList-Character> consisting of the characters from the String word N.B.Character is a new type for us. A Character represents a single character from a String using the add method of the ArrayList 35 *Note that word.charAt(i) returns a value that can be directly added to an ArrayList 37 38 * For example, string2charList('MIng") must yield the ArrayList that prints as , i, l, m, a] 43 public ArrayList Character> string2charList (String word) ArrayList list new ArrayListO /I put your code here return list; 47

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!