Question: Exercise 3 [10 pointsl: Define a FixdLenStringList class that encapsulate a list of strings and a string length. All string in a FixdLenStringList have the

Exercise 3 [10 pointsl: Define a FixdLenStringList class that encapsulate a list of strings and a string length. All string in a FixdLenStringList have the same length. There is not limit on number of strings (dynamic array) that a FixdLenStringList can hold. For example, cc, and dd (all The FixdLenStringList listl may contain the strings aa, bb, strings of length 2) The FixdLenStringList list2 may contain the strings cat, dog, pig, fox bat, and eel (all strings of length 3) An incomplete implementation of the FixdLenStringList.java class is provided with this exercise: Here are the required methods in the FixdLenStringList class that you need to implement i Public constructor This constructor will have one parameter that will indicate the length of each string in FixdLenStringList's list. The constructor will initialize strLength with this value and will initialize FixdLenStringList's list of strings, possiblestrings, to have 0 entries. You are to implement the found method. This method returns true if its String parameter key is found in the list of strings, false otherwise. You are to implement the addstring method. This method will add a string to the FixdLenstringList's list if it is the correct length and not already in the list. If the string is already in the list or if the string is not the correct length, it is not added. HINT: you may call method found that is specified in part ii of this problem You are to implement the method removeRandomString that will remove and return a random string entry from FixdLenStringList's list of strings ii) iii) iv) Write a client test class for testing the FixdLenStringList class. Supply, your client class along with screen shots of some test runs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
