Question: Try writing a C++ program to get student grades from the user, calculate the grade average, and determine the appropriate letter grade for the student.

Try writing a C++ program to get student grades from the user, calculate the grade average, and determine the appropriate letter grade for the student. Each student will have a series of lab grades (weighted at 65%) and a series of test grades (weighted at 35%). Use loops to continue getting grades until -1 is entered. Grades must be valid (0 - 100). Letter grades are standard, with A (>= 90), B (80 - 89), C (70 - 79), D (60 - 69), and F (< 60). For this assignment, 89.99 is a B, not an A.

The following prototypes are provided. You may use additional functions but these are required:

double getGrade(); - prompts user for a valid numeric grade and returns it

double getAverage(double, int); - returns average, given total and count

double calculateFinalGrade(double, double); - returns final grade, given lab average and test average

char getLetterGrade(double); - returns letter grade given final number grade

void printResults(char); - displays student's letter grade for the class

Possible pseudocode for main()

"hello"
loop to get lab grades (track count and sum)(-1 to exit)
call function to assign result to labAverage
loop to get test grades (track count and sum)(-1 to exit)
call function to assign result to testAverage
call function to assign finalGrade
call function to assign letterGrade
call function to display results
"goodbye"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!