Computer Science
15-111 (Sections A & B), Spring 2007
Homework #3: Extra Credit
Due:
Mon 29-Jan-2007, 8pm (online submisson).
Note: This is EXTRA CREDIT. It is entirely OPTIONAL. You do not even have to read this document if
you do not wish to do so.
Note: Each question in this assignment, if done
correctly and to a reasonable coding standard, is worth the given amount of
Extra Credit (even if it requires more or less time on your part). While it will be graded if submitted, it will
not count towards this homework’s grade.
Instead, it will be taken into account at the end of the semester if you
are “on the bubble”, as described in the Course Syllabus.
Write the
following Java programs. The same
guidelines apply as during the main assignment:
use good style.
1. [2 hours] Write a program, WordSearchMaker.java,
that reads in a list of words and generates
a word search board containing those words, and then generates a file with that
board and the input words such as can be read in by our WordSearch.java
program. Finally, generate a second file
containing the solutions themselves (as WordSearch.java would itself generate
on the board). Unless you come up with a
better algorithm, you should randomly
place the words (in a random location heading in a random direction). The actual mechanics for this we leave to you
(it’s extra credit, after all). In order
to get all the extra credit, your resulting boards must be reasonably small, with some words sharing letters
with other words. The more shared letters,
the better!