CIS 71 (section 1): Homework 10
Handed out: 4/08/97
Due: by 2:30pm on 4/15/97
Email program to btrianta@thunder.temple.edu
This homework is very similar to homework 9, but there are a number
of differences:
- Instead of reading a sequence of positive integers terminated by a
non-positive integer, we will read a sequence of strings terminated
by a null string [i.e. a string of length zero].
- Instead of prompting the user at the terminal for the
values in the sequence, we will read the values from a text file
prepared in advance. You should test your program with the
test file I have made available with this homework. We will assume that this
file is called unsorted.dat.
- Instead of printing out the corresponding sorted sequence, we will
write it out to a file, sorted.dat.
- Instead of prompting the user for the values to be searched for, we
will read such values from a file that I have also made available
with this homework. We will call this file who.dat.
- Instead of printing out the results of the searches to the screen,
we will write them to a file, answers.dat.
- Instead of a limit of at most 20 entries in the sequence,
this time we will assume that we can have up to 2000 entries, each
with up to 64 characters.
It would be great if you decomposed your program into a number of files,
a file where you declare all the functions you use, a file where you define
the functions you use, and a file for the main program. Then of course
you have to be careful in compiling and linking these files.
As a comment at the beginning of your program you should do a case
analysis for this problem: problem statement, analysis, design,
implementation, and testing.