CS 1323 Section 30, Spring 1997
Individual Project 8 -
Optional Version
Data Normalization Revisited
Due Wednesday, April 30, 3:30pm
Grace Period: April 30 - 4:30pm May 8
no lateness penalty for projects submitted during
the grace period
What to Hand In (see also:
example project solution)
- A
Program Organization Chart
exhibiting the interactions between major program
components. Attach a report to the chart
providing a rationale for the program organization.
- A chart illustrating the major data structures your
program uses, the transformations they undergo, and
the components of your program responsible for these
transformations
- A
listing
of the C program you write for your
project, following the required
standards.
- A
session transcript
in which
compile and run
your progrm
to demonstrate its capabilities
- A printed copy of each of the files your program reads
during the demonstration session.
The Program You Must Write
Write a program that
retrieves data from the file
rainfall.dat
(available on the Supplied Software page of the class web site),
normalizes the data,
and displays the
normalized data on the screen.
- Data Format
of
rainfall.dat
Heading Lines.
The first few lines of the data file describe the source of the data.
The next-to-last of these lines
is a sequence of words (strings containing no spaces)
identifying the parameter associated with the corresponding
entry in each of the data lines.
These are called parameter identifiers, and the
line containing them is called the parameter heading.
The last of the heading lines contains no characters;
this is the only empty line in the heading.
Data Lines.
Each subsequent line of the data file begins with a word identifying
the data on the line followed by a space and
a sequence of numbers separated by spaces.
The word is called the data identifier and the
numbers are the data associated with it.
Each data line contains the same number of numbers, namely
one fewer numbers than
the parameter heading has words.
This means that the number of words in the
parameter heading is the same as the number of words on
each data line (since the numbers on the data lines are "words,"
in the
sense defined in the description of the heading lines).
- Display Format
Heading Lines.
Display of heading lines is not required for this problem.
If you want an extra challenge,
display the heading lines as they were given in the data file,
and line up the words in the parameter heading
with the corresponding columns of
numbers (or, in one case, data identifiers) below them.
Data Lines.
Line up the numbers in columns, and line up the
data identifiers in a column under the first word in the
parameter heading. You may assume that all of the data
identifiers have the same length
(that is, that they contain the same number of characters)
and that that length is not more than ten.
If you want an extra challenge, assume only that all of the
data identifiers contain ten or fewer characters.
- Data Normalization
Normalize the columns of numbers in the data so that they all have
unit standard deviation. That is, divide each of the numbers
in the k-th column by the standard deviation of the numbers
in the k-th column. (The k-th column consists
of the k-th number from each of the data lines.)
Ground Rules
- Your program may assume that the input file contains
at least one and no more than
twenty paramater identifiers (and, therefore, no more
than twenty columns of data) and that it contains
at least one and no more
than fifty data identifiers (and, therefore, no more than
fifty rows of data).
- Your program must
not assume any specific value for the
number of parameter or data identifiers,
nor may it assume
any specific value (nor even any upper bound) for the
number of lines in the heading.
- Your program must contain definitions of functions organized in
modules, and it must make profitable use of them.
- Your program may use any aspects of C covered in class or in the
assigned readings in the C textbook, but it must not use any
aspects of C not covered in lectures or assigned readings.
(Exception: you may use aspects of C covered in Lesson 31-34
of the C textbook.)
- The
Project Style Guide
describes additional requirements.
CS 1323 Section 30 - Fundamentals of Computer Programming -
Spring 1997
Instructor:
Rex Page
(Email: page@ou.edu)
Up to: Welcome Page ~~~
Up to: University of Oklahoma ~~~
Go to:
Next Semester ~~~
Go to:
Previous Semester