version 2.01 January 25, 2000

54-283 PC II - Chapter 2 - Programming Assignment  Implement and Test the Statistician Class

Due Date:  February 8, 2000
Project Report: February 1, 2000



Note: Viewing current or past student solutions to this problem would consitute a violation of Southwestern University's Honor Code.

The Assignment:
You will complete the implementation and test a small class called Statistician, which is similar to some of the small classes in Chapter 2 of the text.
Purposes:
Ensure that you can write a small class that meets a precise specification.
Give you experience in using a test program to track down bugs in a class's implementation.
Before Starting:
Read all of Chapter 2.
Know how to compile and run java programs on your system.
File that you must complete:
Other files that you may find helpful:
  1. StatTest.java: A simple interactive test program.
  2. Statistician.html: A detailed discussion of the specification.
  3. statexam.java:  A grading program to indicate what your program might get.
Hand in:
  1. A diskette with a folder clearly labeled Lab2 which contains my program StatTest.java and your Statisitican.java
  2. A printout of the code for Statistician.Java

 The Statistician Class 
Discussion of the Assignment

You will implement a new class called Statistician, the specification (most of which is written for you) and the implementations for the class specification which you must finish . The Statistician is a class that is designed to keep track of simple statistics about a sequence of real numbers. There are two member methods that you should understand at an informal level before you proceed any further. The prototypes for these two functions are shown here as part of the Statistician class declaration:As indicated above,
public double mean( )
   {
      // The student's code will replace this return statement:
      return 0.0;
   }

public void next(double number)
{
}