Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is in C++. Example: You will write a program that will prompt the user to enter a grade out of 100 and then show

This is in C++.

image text in transcribed

Example:

image text in transcribed

You will write a program that will prompt the user to enter a grade out of 100 and then show them what the equivalent grade points value is. The main() function will handle the input and output tasks, but the actual conversion will occur in a function called GradePoints(). GradePoints Specifications This function is strictly a processing function, meaning that there are no console input or output steps in the actual function. Consider that this function may be re-used in a Windows Forms based program later, so cin and cout might not make sense. This function will have one parameter only. This parameter will be the grade out of 100 that needs to be converted. Note that part of the conversion process includes rounding off the grade to the nearest whole number, and we want this rounding to effect the original variable holding the grade. Consider whether this parameter should be pass-by-value or pass-by-reference. This function will result in one of two outcomes. If the parameter is between 0 and 100, the function will round off the grade to the nearest whole number and return the equivalent GPA value. Use the table below for the equivalencies. Otherwise, if the grade coming in is not between 0 and 100, the function will throw a std::out_of_range exception. Letter A+ A | A- B+ Grade 90-100 85-89 80-84 75-79 70-74 65-69 60-64 55-59 50-54 Below 50 Points 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 GRADE EQUIVALENCY GUIDE 1 Description Notes Outstanding Grades are rounded to the nearest whole number Exemplary before converting to grade points. For example, a Excellent grade of 74.6 is 3.5 grade points, whereas 74.4 is 3.0. Very Good This step is part of the grade points conversion Good process. Satisfactory Acceptable Grades must be between 0 and 100. Conditional Pass Conditional Pass Fail D+ D- F 0.0 Enter percentage grades to convert to grade points. Enter "-1" to quit. Percentage grade: chicken * Invalid input. Please try again and enter a numeric value. 85.2 85.0% is 4.5 grade points. Percentage grade: 84.6 85.ex is 4.5 grade points. Percentage grade: 505 An exception occurred: Grade must be between 0.000000 and 100.000000 Percentage grade: -1 Good-bye

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago