CIS 114                                                     Summer 2005

                         Program 1
        	         ---------
Credit: 75 Points.
Due Date:  Friday, June 10th, 6:00 PM.

15 points late penalty if it is late.

ZERO points if it is received after June 11th 6:00 PM.

1) Problem:  Write a program that reads in numbers from a file.
You may assume that there is one integer number per line in the file.
You may assume that the very first number tells you how many more
numbers are coming.  (In other words, the very first number is NOT
part of the actual data. It just tells you how long the data is.)

2) Store the numbers (after the first) into a linked list.  You may NOT 
store the numbers in an array, you have to put them immediately into a 
linked list.  No array is allowed anywhere in the program.
Any new number goes at the BEGINNING of the list.

When the file is finished, then compute the following for the numbers
in the linked list and print the results in a "user-friendly format" 
to the screen.

a) The sum of all the numbers in the linked list.
b) The average (arithmetic mean) of all the numbers in the linked list.
c) The standard deviation of all the numbers in linked the list.
Please look up the formula for the standard deviation on the Web.
(You really should know it by now.)
d) The Harmonic Mean of the numbers.
Look here if you don't know the formula:
http://mathworld.wolfram.com/HarmonicMean.html

3) Test the program with the following TWO data files:

File 1:

5 <---- 5 numbers in the list
3
8
2
6
7

File 2:

7   <---- 7 numbers in the list
12
89
104
67
23
43
87


General Comments:

1) Your program should be documented, as you learned in previous classes.
Internal documentation:  Brief explanations within the C++ code.
External documentation:  A brief write up (under a page length) explaining
what the program is doing, how to run it and where the files are.

The external documentation must be typed and spell-checked.  I WILL take 
points off for obvious errors, like sentences that end in the middle.

2) Your program should be reasonably indented.  I WILL take points
off for "random" or completely missing indentations.

3) Your submission should contain working code.  Don't bother submitting
if there are compiler error messages.  You will not get any points
for something that does not compile.  

If you get part of it working you get partial credit.  If you get
all of it "almost working" but it does not compile, you get no
credit at all.  So... try to advance from one working version to
the next, adding functionality slowly.

5) Your submission should also contain two screen dumps that show that 
the program is working.  

The burden of proof is up to you.  If you don't show it works, I will
assume it does not work.

6) I really prefer hardcopy submissions....  But, if you can't
(and most of you probably can't) send me ONE email with THREE attachments:

-- The C++ code
-- The screen dump (that shows that it works)
-- The external documentation.

Did I mention I prefer hardcopy submissions?

7) The subject line should say:
CS 114, Program 1