CIS 1.5
Professor Langsam
Assignment #3
Write a complete C++ program for the following problem. Your instructor needs a program that will calculate student semester averages, final letter grades as well as the class average and the distribution of letter grades. A data file, StudentGrades.txt, has been prepared containing the student’s name, and three test scores, test1, test2 and finalTest.
The program will do the following:
semesterAverage
= 0.20 * test1 + 0.30 * test2 + 0.50 * finalTest
Semester Average Final Letter Grade
>= 90 A
>= 80 B
>= 70 C
>= 60 D
<60 F
Your program must determine when there are no more student’s to process. Explain your method in a comment. Write all output to a file called Roster.txt. Your output should contain headings and be neatly formatted. Use the following data:
Meredith 85 90 85
Bailey 70 90 70
Izzie 45 50 65
George 75 80 72
Cristina 72 78 78
Gibbs 92 98 95
Denozzo 70 70 70
Ziva 90 88 95
McGee 88 88 88
Abby 50 65 65
Be sure to use meaningful variables, avoid the use of global variables and format your program using the style we have adopted in class.