Question: Hi, I need help with #3 and 4 please provide correct code by testing and getting the expected output. Thanks! Model.java 1 package code 3irport

 Hi, I need help with #3 and 4 please provide correctcode by testing and getting the expected output. Thanks! Model.java 1 packagecode 3irport java.util.ArrayList; 6 public class Model [ 8 The game willuse a dictionary of words 10 *Question 1 The starter words' are

Hi, I need help with #3 and 4 please provide correct code by testing and getting the expected output. Thanks!

Model.java 1 package code 3irport java.util.ArrayList; 6 public class Model [ 8 The game will use a dictionary of words 10 *Question 1 The starter words' are all supposed to be of a certain length In the TextTwist2 game the 'starter words" are all of length 7 12 13 14 15 16 Write a method that takes in an Arraylist called list and an int named length and returns a new ArrayList containing the members of list that contain exactly length characters For example, is dictionary is an ArrayList, then calling 18 19 20 filterWordsForLength(dictionary, 7) will produce an ArrayList of seven-letter words 23 24 25 public ArraylistO; II put your code here return answer; *This method accepts a String as input and returns an ArrayList consisting of the characters from the String word * Question 2 N.B. Character is a new type for us. A Character represents a single character from a String 34 35 36 37 38 39 *Note that word.charAt(i) returns a value that can be directly added to an ArrayList For example, string2charListC"Wilma must yield the ArrayList that prints as [W, i, l, m, a] 41 43 public ArrayList II put your code here return list; 48

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!