I didn't even see this post before I posted in the other
thread! Here's my solution to part a. Part b is not accounted for though I'm afraid.
Start with an empty char[][].
Sort the word list by length, with the longer words first in the list, the idea being that it's easier to insert the longer words in as empty a grid as possible.
For each word {
Obtain a random empty grid space.
Obtain a random direction.
If the word will not fit (that is each letter must either fall across an empty space or a space containing the same letter) in that direction, try all the other directions until a fit is found.
If the word will not fit in any orientation in this grid space, get the next empty grid space and repeat the process.
}
Fill all remaining empty spaces with a random character.
Here's my code, including the GridReference class I used for WordFinder.
WordSearchMaker.java
GridReference.java