Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The given code is below( Code in Code Here Thank you) #include #include #include using namespace std; //A+ --> 4.0, A --> 4.0, A- -->
The given code is below( Code in Code Here Thank you)
#include
using namespace std;
//"A+" --> 4.0, "A" --> 4.0, "A-" --> 3.7, ... so on. double letterToPoints(string grade) { //CODE HERE }
int main() { //CODE HERE }
Write a C++ program to read the grade data for all courses of a student and output the cumulative GPA and the GPA for 'core courses. User enters one line of data for each course: # of credit hours, the letter grade & a flag indicating whether it is a "core" course (1 means it is a core course, O means it is not). Last line of input contains 0 for the credit hours indicating the end of input. Cumulative GPA is computed by adding (# of grade points * # of credit hours) for all courses divided by total # of credit hours. Core GPA is computed the same way, but only based on the "core" courses. Output both with the precision of exactly 2 fractional digits. Here is a sample input & output: 2 A 1 3 B+ 0 4 AO 3 C-1 0 Cumulative GPA: 3.25 Core GPA: 2.62 Output NA for Core GPA, in case the student has not done any core courses at all. Utilize a function letter ToPoints for the conversion. Use this table to convert the letter grades to GPA for each course: Letter Grade Grade Points A+ 4.0 A 4.0 A- 3.7 B+ 3.3 B 3.0 B- 2.7 C+ 2.3 2.0 1.7 D+ 1.3 D 1.0 F 0.0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started