CSE 271: Programming Assignment 7

Assigned: March 19
Due: March 27

Abstract

Practice C strings and arrays within a modern development environment.

Details

You are a contract programmer for the local newspaper. Every week, they run a word search puzzle with words from the week's headlines. However, the person who has been creating them for the past 15 years is about to retire, and they ask you to write a program to do it instead.

So, this might be a simple example:

Words: retire, word, search, puzzle

zxlysa
eriter
lplmaq
ziword
zolacp
umvohx
pamile

Your job is to write a C program that reads in a list of words, one per line, asks the user how many rows and columns, and builds a puzzle using all words in those dimensions, placing them forward, backwards, upwards, downwards, or diagonally, or produces an error saying it cannot be done. If a valid puzzle can be created, your program should print out the puzzle and the solution (a puzzle in which all letters which are not answers are printed with the hyphen '-' instead). The solution for the above puzzle is:

----s-
eriter
l---a-
z-word
z---c-
u---h-
p-----

Moreover, you must develop this program not using emacs, or vi, or your favorite editor on your laptop, but instead using the NetBeans programming environment. When your project is complete, Export the project using NetBeans into a .zip file, and place that file to be collected.

Submission Requirements

  1. As usual, the zip file must reside in the cse271.131/p7 subdirectory. Name your code p7.c and your project file p7.zip.
  2. Your name must be in the comment section (along with appropriate description, etc.).
  3. Do a touch DONE when the program is ready to be collected.

Last revised: 19 March 2013.