Program 6, Finally, a Grade.

Short Description:

Write a program which will act as a grade book.

This assignment is worth 50 points.

Goals

When you finish this homework, you should:

Formal Description

Dr. Gary E. Rader is in trouble. He has carefully graded assignments all semester, dutifully recording grades for each student in that student's file. Now he needs to compute the final grade. When he first started teaching, he learned to use an editor, and that is the only software tool he has ever mastered. In the past he has asked his friend Dr. Cody Good to compute his grades for him but Dr. Good retired and Dr. Rader does not have the programs Dr. Good used. Since you are in Dr. Rader's class, you have decided to assist him by writing a program which will compute his final grades.

Dr. Rader always gives three homeworks, two programs and two tests, no matter what the class or subject. When he grades, Dr. Rader makes a directory for each class. This directory contains a file called roster.txt in the following format.

An example of this file MIGHT be:
20 30 50
jones, chuck 1234567890
Jones, Tommy-Lee 1111111111  This is not Chuck's brother.  Hangs out with WS
Smith, Will 0987654321 For some reason, always dressed in black.
Smith, Wesson 9999999999 A real straight shooter
Smith, Anna-Nicole 1010101010 

Each student listed in the file roster.txt will have their own data file. The file will be named FDDDDDDDDDDL.data, where F is the student's first initial, in upper case, L is the student's last initial, also uppercase, and DDDDDDDDDD is the student's id number. So the previous roster.txt file would have associated files named:

B1234567890J.data
T1111111111J.data
W0987654321S.data
W9999999999S.data
A1010101010S.data
The format of each student file is: An example file might be T1111111111J.data, which could contain:
90 80 87 100 99 .86 .79
Your program should process the student by opening the student data file, reading in the information, computing the weighted average, and creating an individualized report file.

Each student should have an individual report file in the following format:

The file should be named using the previous file name format, but have an extension of .rpt.

An example of this file, using the data file above might be: The file would be called T1111111111J.rpt.

Tommy-Lee Jones 
1111111111  
Homework: 90 80 87 85.7%
Programs: 100 99 99.5%
Tests: 86% 79% 82.5%
Class Average: 88.2%

You will read one roster file, read five different grade files and create five different student record files. This will change based upon the number of names listed in the roster file.

Design

You should design this program, including an program design, before you implement the code. This design should be a submitted on Monday April 30, and should include: Please print this design document and hand it in at the beginning of class on Monday April 30. This design is worth 5 points.

Required Files

A single source code file and a design document.

Submission

Email your final source code file to danbennett360@gmail.com.