CS 1044, Schuetz
Project # 6
Spring 1998

Grade Report

 

Due Date: 11:59 pm, Tuesday, April 28, 1998. As noted on the course syllabus, no late assignments will be accepted for this last project.

 

Project 6 may be done jointly with one other class member. In that case, both names must appear in the program header and only one grader account may be used. To request to work together, submit a collaboration request form (no e-mail) to the instructor by 9:30 am Thursday, April 23. This form is found on the class Web page.

Objective:

This project will give you the opportunity to learn how to 1) declare a struct data type in a C++ program, 2) declare and use struct variables and arrays in a C++ program to hold data temporarily, and 3) sort data held in a struct type array.

Problem Statement:

A professor maintains the following information on each student in a class: student id number, status code (explained later), grades for seven quizzes, grades for six assignments, grades for two tests, and grade for the final exam in a student file called "asgn6.in". The professor maintains each quiz score on the basis of 10 points, each assignment score on the basis of 100 points, each test score on the basis of 100 points, and the final exam score on the basis of 200 points. You are required to develop a C++ program to produce a grade report for the class based on the following processing requirements and input/output specifications:

The distribution of the total grade points is as follows:

Quizzes				10%
Assignments			35%
Test 1				15%
Test 2				15%
A Final Exam			25%

 

According to the policy of the professor, for each valid or excused test absence, the percentage weight of the test (15%) is be added to the percentage weight of the final exam. In order to handle valid test absence cases, the professor maintains a data item ‘status code’ which is to be interpreted as follows for grading:

Status Code Meaning
0 Participated in all tests (or missed tests for no reasons)
1 Excused from Test1
2 Excused from Test2
3 Excused from both Test1 and Test2

Notice that status code is to be used to determine the correct percentage weight for the final exam, specifically for excused test absences.

Your program should calculate the total score for each student on the scale of 100, should round off the total score to one decimal place, and then should determine the letter grade for each student according to the following scale:

Total Score			Grade
90 - 100			A
80 - 89.9			B
70 - 79.9			C
60 - 69.9			D
0 - 59.9			F

Input:

To test your program, create an input file named "asgn6.in" with a line of entry for each student in the class containing the following data items, each separated by one or more spaces.

Student ID
Status code
Seven quiz scores each separated by space(s)
Six assignment scores separated by space(s)
Two test scores separated by space(s)
Final exam score
 

Assume all data are valid. Also assume that the file may contain entries for maximum one hundred students. You may use following data to test your program.

 

 8426 0 0 5 6 6 5 6 4  61  78  81  82  90  92  85  91 170
23827 2 5 6 6 7 3 4 8  76  75  76  74  52  78  77   0 196
 6838 0 0 8 0 3 0 9 0  84  90  63  92  60  83  85  95 143
 3907 0 3 3 5 9 7 9 5  38  74  65  65  47  80  78  95 130
  359 1 8 8 7 9 9 7 4  88  92  85  94 100  99   0  97 180
31806 1 4 9 0 8 6 0 8  67  60  60  78  50  75   0  96 174
 1701 3 7 9 0 7 6 8 0  34   0  47  26  30  41   0   0 127
23131 2 0 7 3 8 4 3 5  30  31  36  67  89  85  55   0 195
28584 3 7 8 3 8 5 8 7  95  98  99  99  91  96   0   0 195
17625 1 8 0 8 5 0 7 8  43  20  46  79  91  64   0  80 176

 

Output:

The program should create an output file ‘asgn6.out’ to save the grade report for the class. With the sample input data, your program should generate the report in the form shown below. Notice that the report contains one blank line after two heading lines and another blank line after the second dashed line near the end of the report. The lines in the report table are sorted in descending order of overall scores of all students in the class. Do not forget to check your results by hand for each letter grade category. Note that the class average is to be computed after the grades (overall scores) have been rounded. Also note that Borland compilers and hand-held calculators may give you a slightly different result to at least one of the scores below due to the way Visual C++ 5.0 handles rounding.

 

 


     CS 1000: Introduction to Computers
            Final Grade Report
 
 Student ID       Overall Score         Grade
----------------------------------------------
   28584	      93.9		  A
     359	      90.5		  A
   23827	      81.5		  B
    8426	      80.5		  B
   31806	      76.9		  C
    6838	      75.3		  C
   17625	      72.4		  C
   23131	      71.3		  C
    3907	      69.6		  D
    1701	      50.6		  F
----------------------------------------------
 
Number of Students:	10
Class Average:		76.2
Number of A's:	2
Number of B's:	2
Number of C's:	4
Number of D's:	1
Number of F's:	1

 

Processing:

The following guidelines may help you to develop your solution program for the project:

Documentation:

Your program should include all the documentation called for in the "Elements of Programming Style," including a header for the main program and all functions and readable in-line documentation that describes the function of each logical segment of code.

Submission:

You should submit your source code electronically to the automated grader. Do not submit the input or the output file. Before you submit your program, make sure your program runs perfectly and provides right output with the sample input data. As with the fifth programming project, you will be allowed a maximum of four submits. This assignment should be submitted as Project Number 6. No late assignments accepted. You can earn two bonus points per day (24 hours) for each day early you submit your program, up to three days (total of 6 points).