Scorecheck program (Assignment 4)

October 1996


The assignment was to develop a program to read in a file containing lists of the form:

  6170 80 90 70
  6225 60 80 70
  8318 60 50 40 

The program should interpret the first number on each line as the student ID, then calculate the average of the next three numbers, which represent grades on assignments. Averages less than 60 get a warning.

Output of the program should look like:

6170 80 90 70 average = 80
6225 60 80 70 average = 70
6318 60 50 40 average = 50 Warning!

The assignment led you through several stages of successive refinement to the program. That is, you should have started with something very simple, then gradually added power to the program until it was complete. Here is a series of sample programs that show how that could have been done:


RETURN to CSCI 1200 Home Page

- John Rieman