Write a program to compute your grade for this class.
- You should assume that you have 10 lab scores, each worth 0 or 1 point
- You should assume that you have 4 program scores, each worth 0-100 points
- You should assume that you have 3 test scores, each worth 0 - 100 points
- Your scores are stored in a file (called grades.dat)
- A second file (called class.inf) contains class information you will need
- The first line contains weights (0-1) for each class component
- These are delimited by commas (,)
- Example
.1,.45,.45
- These represent lab, program and test weights.
- The next four integers represent the minimum percentage score required to receive each of the following grades: A, B, C, D
- These are delimited by a period (.)
- Example
90.80.70.59
- Again, you can create this file with your editor
- You should calculate your final score as a weighted average
- FinalAverage = LabAverage*LabWeight + ProgramAverage*ProgramWeight + TestAverage*TestWeight
- You should print a final report (to a file called report.out)
- The format should be as follows
Final Grade Report
Homework X/10
Program Scores XX, XX, XX
Test Scores XX, XX, XX
Homework XXX.XX %
Programs XXX.XX %
Tests XXX.XX %
---------------------
Final Score XXX.XX %
Grade:
100 % To XX% A
XX % To XX% B
XX % To XX% C
XX % To XX% D
Below XX% F
Your program should be well documented, including block comments at
the beginning of the program, individual comments at the beginning of
logical sections of the code, and other comments when necessairy. You should
identify the use of all variables with a comment when they are declared.
In addition, you should use good self documenting techniques. This includes
reasonable variable names, blank lines and good indentation.
When the program is complete, please send a copy of the .C file only to dbennett@edinboro.edu,
the subject of your message should be program2, csci 130
Goals:
- Use files for input/output
- Deal with types float and int
- Standard programming (comments, algorithms, useage, ...)