CS 106 Winter 2016

Lab 09: Text processing


Question 1 Word trivia

One of the benefits of learning some basic text processing skills is the ability to cheat at word puzzles (if you're of that disposition). If you're looking for a word with some particular property, you can write a sketch that loads in a dictionary of words, walks over every word in the list, and checks those words for the property in question.

Download the starter code and open the sketch WordPuzzles. When you run it, it will load in a file called sowpods.txt (a standard word list used to play the board game Scrabble). The sketch is written to solve six separate word puzzles in the functions getWords_0() ... getWords_5() (a bit like the Dancers sketch in Lab 05). The first puzzle (i.e., getWords_0()) is solved for you so that you can see the general approach. Your job is to solve the other word puzzles. A few notes on this process:

Save your work in a sketch titled WordPuzzles.

Submission

Remember to review the Code Style Guide and use Processing's built-in auto format tool. Then review the How To Submit document. At the top of all of your source files, be sure to include a comment with your name and student ID number. When you're ready, zip up your L09 folder, which contains the WordPuzzles sketch. Upload the file L09.zip to LEARN.