CS 117 Assignment
Due Wednesday, 5/20/98


For this assignment you will write a data-processing program. A legal input file for this program will consist of lines like this:

Bernice 10 23 443 24
Zebediah 27 32 32 2
Agatha 2 41 16 5
Neville 32 222 1 3

Maybe they're miniature golf scores, maybe they're test scores, maybe they're blood test results. Let the numbers mean whatever you want them to mean.

Every person in the input file will have four scores. You may assume that there will be no more than 100 people in the data file.

Your task is to read this data file in, and print out a list of names, maxima, and averages, sorted by average score. Thus, the output corresponding to the 4-person file example above should look something like this:

Name        Max       Avg
--------------------------
Bernice     443     125.00
Neville     222      64.50
Zebediah     32      23.25
Agatha       41      16.00

Some advice

This program is big enough that you need to think carefully about how to organize it, what the interfaces of your functions should look like, and in what order you will implement and test the routines.

You might, for example, decide to define a class to represent a single person


	class Person
	{
	private:
		string     mName;
		int        mScores[4];
		
		etc.
	};
and use an array of 100 Persons as your main data structure. Then, you might make a plan of stages of the development of your program: You may certainly design a different plan, but you should plan some way to develop and test your program gradually. Trying to code it all in one blow and then debug and test the result is a recipe for long frustrating sessions in the lab.

Start early, stay in touch, and have fun.



Jeff Ondich, Department of Mathematics and Computer Science, Carleton College, Northfield, MN 55057
(507) 646-4364, jondich@carleton.edu