Description
Source:
Problem 2 AND problem 3 described in the programming projects section of Chapter 2 of
the textbook (pp 90).
Purposes:
1. Ensure that you can write a small class that meets a precise specification.
2. Make sure you understand how to write a class that is separated into a header file and
an implementation file.
3. Give you experience in using a test program to track down bugs in a class’s
implementation.
Before Starting:
1. Know how to compile and run C++ programs (e.g., using g++ or VC++).
2. Read all of Chapter 2.
3. Read the instructions from pp 90-91 carefully, especially the Notes part (at the end of
page 89). As the notes suggest, do not try to store the entire sequence. Instead, just
store the necessary information about the sequence: length, sum, smallest, largest,
etc.
4. Also read discussions, hints and frequently asked questions at
https://www.cs.colorado.edu/~main/projects/Assn0201-Statistician.html.
How to Turn In:
Pack your files (source code only!) in a single WinZip file (Windows) or tar file
(Unix/Linux) and submit it through Blackboard. Please do not submit your
executable files.
Files that you must write:
1. stats.h: The header file for the new statistician class. Actually, you don’t have to write
much of this file. Just start with the textbook version
(https://www.cs.colorado.edu/~main/projects/stats.h) and add your name, email and
other information at the top. If some of your member functions are implemented as
inline functions, then you may put those implementations in this file too.
2. stats.cxx: The implementation file for the new statistician class. You will write all of this
file, which will have the implementations of all the statistician’s member functions.
Other files that you may find helpful:
You shall compile one of the following files with your stats.cxx and link them to generate your
executable:
1. statexam.cxx (https://www.cs.colorado.edu/~main/projects/statexam.cxx): A noninteractive test program to test the correctness of your implementations.
2. stattest.cxx: (https://www.cs.colorado.edu/~main/projects/stattest.cxx) A simple
interactive test program to demonstrate the functionality of your implementations.


