CSC 101 Programming Assignment 4
Word Find



DUE: On or before 11:59:59PM Monday 23 May, via handin on vogon

Overview

The program for this assignment finds words in word search puzzles. Writing the program requires that you understand the following concepts:

Specification

In this program you will implement a program which locates words in common word search puzzles (all puzzles are 10x10). A sample puzzle is shown below:

WAQHGTTWZE
CBNSZQQELS
AZXWKWIIML
LDWLFXXSAV
PONDTMVUXN
OEDSDYQPOB
LGQCKGMMIT
YCSLOACAZM
XVDMGSXCYZ
UUIUNIXFNU

The above puzzle contains the words: unix, calpoly, slo, and campus.

Words can appear in the puzzle running up, down, left-to-right, or right-to-left. You do not need to check diagonals.

Input and Output

Your program should take 2 files as command line arguments:

Your program will always be tested with these 2 command line arguments:

./wordsearch puzzle1 words1

Sample program output is shown below:

Puzzle:

WAQHGTTWEE
CBMIVQQELS
AZXWKWIIIL
LDWLFXPIPV
PONDTMVAMN
OEDSOYQGOB
LGQCKGMMCT
YCSLOACUZM
XVDMGSXCYZ
UUIUNIXFNU

UNIX: (LEFT) row: 9 column: 3       /* LEFT means left-to-right */
CALPOLY: (DOWN) row: 1 column: 0
GCC: word not found
SLO: (LEFT) row: 7 column: 2
COMPILE: (UP) row: 6 column: 8
VIM: (RIGHT) row: 1 column: 4
TEST: word not found

Location of Input Files

Your program will be evaluated using a set of input files. Sample input and expected output files are located in the program 4 directory (on vogon, copy them from ~djanzen/www/courses/101S11/projects/proj4/files/).

You can get them with the following command:

cp ~djanzen/www/courses/101S11/projects/proj4/files/* .

Function Decomposition and Automated Unit Tests

You are expected to use good design principles as discussed in class and the book. Divide your solution into multiple functions. You are encouraged to write tests for your functions with the checkit_* functions as appropriate.

Code Style

Be sure to follow the course Code Style, and don't forget to run

indent -kr -nut wordsearch.c
on your program before handing it in.

Collaboration

NO collaboration is allowed on this assignment. Everyone must do their own individual work.

Program Turnin Procedure

You submit one program file named wordsearch.c. Use the vogon handin command:

handin djanzen 101_prog4 wordsearch.c
Complete this survey.