Question: C++ programming help!! Program Description: Make a program to generate a report based on input received from a text file.Suppose the input text file student_grades.txt
C++ programming help!!
Program Description:
Make a program to generate a report based on input received from a text file.Suppose the input text file student_grades.txt contains the student's Last name , First name,SSN, Test1, Test2, Test3 and Test4. (25%)
Make a txt file that has this information:
AlfalfaAloysius123-45-6789 40.090.0100.083.0
Generate the output Report File student_final.txt in the following format:
LastName FirstNameSSNTest1Test2Test3Test4 Average FinalGrade
i.e.(should look like this when the program is run)
AlfalfaAloysius123-45-6789 40.090.0100.083.078.25 .0C+
The program must be written to use the enum letterGrade:
enum letterGrade {A_PLUS,A, A_MINUS,B_PLUS,B, B_MINUS, C_PLUS,C, C_MINUS,D_PLUS,D, D_MINUS,F };
Use the following function prototype for deriving letter grade:
letterGrade deriveGrade(double average);
The average is calculated as follows: (test1 + test2 + test3 + test4)/4.0
The function deriveGrade should derive the letterGrade of the student based on the following grading scale:
Letter Grade
Percentage
GPA
A+ 97%+ 4.33/4.00 or 4.00/4.00
A 93%-96% 4.00/4.00
A- 90%-92% 3.67/4.00
B+ 87%-89% 3.33/4.00
B 83%-86% 3.00/4.00
B- 80%-82% 2.67/4.00
C+ 77%-79% 2.33/4.00
C 73%-76% 2.00/4.00
C- 70%-72% 1.67/4.00
D+ 67%-69% 1.33/4.00
D 63%-66% 1.00/4.00
D- 60%-62% 0.67/4.00
F 0%-59% 0.00/4.00
Also provide the following function:
string convertToText(letterGrade grade); //This function converts a letterGrade type to a string type.
Requirement:
The namespace 'gradeOpt' definition should contain the following members:(15%)
a.the enum letterGrade definition,
b.deriveGrade(..) function prototype and,
c.convertToText(...) function prototype
Add the namespace 'gradeOpt ' to the grade.h header file and the namespace member function definitions to the file grade.cpp file. (10%)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
