UMBC CMSC 104
UMBC CMSC 104 Spring 2001 CSEE | 104 | current 104

CMSC 104, Spring 2001

Project 6 - Exam Statistics

Due Date:

Midnight, Thursday April 19

Note: No late projects will be accepted.

Point Value:

This assignment is worth 75 points.

Objectives:

Assignment:

Background

Congratulations! You are the new Teaching Assistant for CMSC 104, Section 0106! As part of your job, you are to write a program to analyze class exam scores. Your program should compute

Part 1 - The Pseudocode (15 points)

First, write the pseudocode to solve the problem. Be sure that your pseudocode includes the greeting and output labels shown in the sample program run below. Type the pseudocode in to a file called p6pseudo.txt.

Part 2 - The C Code (60 points)

Next, write the corresponding C program. Call it proj6.c.

A data file containing the scores for you to use as input to your program will be provided. (NOTE: These are NOT the real scores from your exams!) The scores are between 0 and 100, inclusive, and are in random order. The last value in the file is
-1. This is the sentinel value that signals the program to stop reading scores.

To use the data file as input to your program, you will use UNIX redirection. By using redirection, you can tell UNIX to read data from a file rather than from the keyboard. The scanf statement that you use in your program will look exactly the same as it would if you were getting your input from the keyboard. But since you will be getting the values from a file instead of from a user typing at the keyboard, you will not need to prompt the user.

When you run your program, use the following command:

a.out < proj6.dat This is how UNIX redirection is done. It is saying to run your executable file using the file proj6.dat as input.

You will need to copy the file proj6.dat into your directory. To do this, go to the directory where you would like to store proj6.dat. Then, use the following command to copy proj6.dat into the directory:

cp /afs/umbc.edu/users/s/m/smitchel/pub/CS104/proj6.dat . Notice that the space and period at the end of the command are part of the command.

Sample Program Run

Here is an example of what an input data file might look like:

79 50 82 0 90 85 -1 Here is the output that would result from using this sample data file:
CMSC 104, Section 0106, Midterm Exam Analysis 6 exams were taken. The highest score was 90 percent. The lowest score was 0 percent. The average score was 64.3 percent. The number of A's was 1.

Your program's output should follow this EXACT format.

Coding Standards:

Note that you MUST adhere to the coding standards and indentation style given on the Projects home page. So read them carefully and immediately!

Project Submission:

Submit your project by e-mailing your pseudocode (p6pseudo.txt) and source code (proj6.c) to Evelyn (cwang3@cs.umbc.edu) as attachments. Make the Subject of the e-mail Project 6 so that Evelyn knows what it is. Do NOT send your executable file (a.out) or the input data file (proj6.dat).


Last Modified: Wednesday, 04-Apr-2001 14:55:31 EDT

Wednesday, 04-Apr-2001 14:55:31 EDT