Assignment 3 - Student Grades Using a 2-Dimensional Array

due October 13th

The purpose of this assignment is the use of 2-dimensional arrays, reading and writing text files, writing functions, and program planning and development.

You will read a data file and store all of the input data in a two-dimensional array.  You will perform calculations on the data and store the results in the 2-dimensional array.  You will sort the array and print the results in a report.

Instructions

You will read in this input file, partially shown below. This 50-record file consists of a (8-digit numeric) student id, 11 assignment's points, midterm points, lab exercise points, final points, and CodeLab points. All of the input data, calculated totals, percent, and grades (and plus or minus) must be stored in only one 2-dimensional array.  The specifications for determination of the grades is the same as the course syllabus. Your output reports should be "very similar" to the output shown below.  The point totals, percent, and grades must follow the exact calculations.  This is the same as assignment 1.  You are to produce two output reports, one sorted by student id and one sorted by total points (in descending order).  The two output reports must be written to separate files.

The Student Data Input File

54288660 39  9 11  9 16 11 13  6 20 13 12 19  83 137  8
46595406 30 19  6 17 12 17 18 19 16 14 13  9  57 130 10
72453988 19 19 19 10 18 19  6 18 15 20 15 20  94 135  5
68954389 41 19 17 19 13 18 18 19 19 18 15 13  90 132 10
16543210 29  1 10 11 10 15 10 10 20 8  15 10  50  71  0
68954389 39 19 17 19 13 18 11 11 19 13 15 13  90 132 10
67654321 48 20 19 20 19 20 19 19 20 19 20 19  98 138  9
52613503 41 18 14 20 19 12 16 19 19 18 17 10  90 143  7
89585328 38 15 20 19 19 17 12 18 17 13 20 16  82  63  1
85168415 31 16 18 17 11 19 13 17 16 14 18  7  61 140 10
...

Output Report Sorted by Student Id

Stdnt Id  Ex  --------- Assignments ----------  Tot  Mi  Fin  CL  Pts  Pct  Gr
--------  --  --------------------------------  ---  --  ---  --  ---  ---  --
00654321  50  20 18 20 19 20 19 19 20 19 20 19  195  98  138   9  490   98  A+
10736268  39  14 18 14 17 14 19 19 15 19 20 14  169  24   97  10  339   68  D+
16543210  29   1 10 11 10 15 10 10 20  8 15 10  119  50   71   0  269   54  F
19519568  44  12 17  9 10 12 15 13 14  2 20  9  131  87  147   5  414   83  B
35519284  32   9 18 16 20 17 20 16 19 20 11  9  166  95  129  10  432   86  B
41239604  33  15  4 15 18 12 19 18 18 10 10 16  151  78  129   2  393   79  C+
44169013  44  19 14 12 18 10 12 15 11  8 19 20  150  71  130   8  403   81  B-
46595406  30  19  6 17 12 17 18 19 16 14 13  9  154  57  130  10  381   76  C
52613503  41  18 14 20 19 12 16 19 19 18 17 10  172  90  143   7  453   91  A-
54288660  39   9 11  9 16 11 13  6 20 13 12 19  133  83  137   8  400   80  B-
...


Output Report Sorted by Total Points (descending)

Stdnt Id  Ex  --------- Assignments ----------  Tot  Mi  Fin  CL  Pts  Pct  Gr
--------  --  --------------------------------  ---  --  ---  --  ---  ---  --
00654321  50  20 18 20 19 20 19 19 20 19 20 19  195  98  138   9  490   98  A+
67654321  48  20 19 20 19 20 19 19 20 19 20 19  195  98  138   9  488   98  A+
52613503  41  18 14 20 19 12 16 19 19 18 17 10  172  90  143   7  453   91  A-
68954389  41  19 17 19 13 18 18 19 19 18 15 13  175  90  132  10  448   90  A-
35519284  32   9 18 16 20 17 20 16 19 20 11  9  166  95  129  10  432   86  B
93576148  47  16 20  3 14 13 15 14 20  7 11 19  149  81  149   5  431   86  B
68954389  39  19 17 19 13 18 11 11 19 13 15 13  157  90  132  10  428   86  B
78517086  32  12 13 19  4 20  8 20  9 20 20 14  155  87  146   6  426   85  B
72453988  19  19 19 10 18 19  6 18 15 20 15 20  173  94  135   5  426   85  B
56924850  46  18 14 13 20  9 18 17 12 18  7 18  157  73  141   7  424   85  B 
...


Program requirements

  1. You must use a 2-dimensional array for all of the data.
  2. Your solution must include at least 5 functions.  And ...
  3. All files must be checked for a successful open.
  4. Email only your source code.