Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to generate a report based on input received from a text file. Suppose the input text file student_grades.txt contains the students Last

Write 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. i.e. Alfalfa Aloysius 123-45-6789 40.0 90.0 100.0 83.0 49.0 Generate the output Report File student_final.txt in the following format : LastName FirstName SSN Test1 Test2 Test3 Test4 FinalGrade i.e. Alfalfa Aloysius 123-45-6789 40.0 90.0 100.0 83.0 49.0 D- Last name First name SSN Test1 Test2 Test3 Test4 Final Grade The program must be written to use the enum letter_grade : enum letter_grade {A, A_PLUS, A_MINUS, B,B_PLUS, B_MINUS, C, C_PLUS, C_MINUS,D,D_PLUS,D_MINUS,F } ; Use the following function prototype for deriving letter grade : letter_grade deriveGrade(double average) ; The average is calculated as follows : (test1 + test2 + test3 + test4)/4.0 The function deriveGrade should derive the letter_grade 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%

.67/4.00

F

0%-59%

0.00/4.00


Also provide the following function :

string convertToText(letter_grade grade) ; //This function converts a letter_grade type to a string type.

Step by Step Solution

3.46 Rating (169 Votes )

There are 3 Steps involved in it

Step: 1

Program gradehpp namespace stdGrade enum lettergrade A APLUS AMINUS BBPLUS BMINUS C CPLUS CMINUSDDPL... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Financial Management

Authors: William R. Lasher

7th edition

128560721X, 9781133593669, 1133593682, 9781285607214, 978-1133593683

More Books

Students also viewed these Programming questions

Question

Describe five of G. Stanley Halls major achievements.

Answered: 1 week ago