PS7: Unjumbler

Name:

 

TASK 1: Unjumbler
The program compiles without errors.

3

 

The remove method should be implemented correctly. The method returns a list in which all occurrences of the given string have been removed (not just one) and the remaining strings have the same order they had in the input.

4

 

The removeDuplicates method should be implemented correctly. The method returns a list in which all repeated occurrences of any string have been removed from the list. The order of the elements in the returned list should be the relative order of the first occurrence of each element in the given list.

6

 

The mapConcat method should be implemented correctly. The method returns a list in which the ith string of the resulting list is the result of concatenating the input string to the ith element of the input list.

4

 

The filterWords method should be implemented correctly. The method returns a list of all strings from the input list that are English words. The resulting strings should be in the same relative order as in the input list.

4

 

The insertions method should be implemented correctly. Given two strings s1 and s2, where s2 has n characters, it returns a StringList with n + 1 strings that result from inserting s1 at all possible positions within s2, from left to right.

7

 

The insertionsList method should be implemented correctly. The method returns a list that contains all the strings that result from inserting the input string at all possible positions in all the strings of the input list.

6

 

The permutations method should be implemented correctly. The method returns a list of all permutations of the input string. The elements in the list returned by permutations may be in any order.

7

 

The unjumble method should be implemented correctly. The method returns a list of all permutations of the input string that are English words. Each word in the resulting list should be listed only once. This method should just be a simple composition of permutations, filterWords, and removeDuplicates; there should be no special cases. removeDuplicates should be performed on the result of filterWords, not vice versa.

2

 

The main method should contain testing code for each of the other methods. There should be test cases in the transcript illustrating correct behavior of each method on a variety of inputs. (It is OK if the test cases are exactly the ones specified in the assignment description.) A transcript of these test cases should be included in the hardcopy submission

4

 

Good programming style is observed:
- Code is concise and elegant
- Comments are used throughout the program to ensure readability and to explain appropriate aspects of the code.
- Auxiliary methods, if present, are used appropriately.

3

 

TOTAL FOR TASK 1

50

 

Total:       /50