Please can someone help me with this...look in the description | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please can someone help me with this...look in the description

From your understanding of arrays and functions, write a C++ program to calculate one’s GPA for a semester. The program should have the following features; • The number of courses it can calculate the GPA on should be dynamic, that is, it should be able to calculate any number of courses entered by a user. • The program should ask of the user’s name and programme. This should be used to print something like a semester report at the end of the calculation to the user. • The program should ask of the individual course’s grade (e.g., A, B+…) and the grades should then be converted to its corresponding grade point for calculation. • Write and use a function for the conversion in the above statement. • The program should as well ask of the individual course’s credit hours as it will be used in the calculation. • Make sure that the program requests the individual credit hours after each grade is enter. For instance, if grade for course 1 is entered, the next request should be credit hours for course 1.

12th Jul 2020, 10:23 AM
Prince Charming
Prince Charming - avatar
4 Answers
+ 3
Ok that's the question but where is your attempt?
12th Jul 2020, 10:32 AM
Arsenic
Arsenic - avatar
0
After your calculation, the program should display a semester report to the user that should include user’s name, programme of study, class for the semester (first, second upper, etc), the individual courses parallel to their respective grade, credit hours and credit points. (Hint: Similar to how your portal displays your result).
12th Jul 2020, 10:27 AM
Prince Charming
Prince Charming - avatar
0
My problem is this After your calculation, the program should display a semester report to the user that should include user’s name, programme of study, class for the semester (first, second upper, etc), the individual courses parallel to their respective grade, credit hours and credit points. (Hint: Similar to how your portal displays your result).
12th Jul 2020, 10:46 AM
Prince Charming
Prince Charming - avatar
0
#include <iostream> #include <iomanip> // std::setprecision using namespace std; double calcGpa(int number_Of_courses,string letterGrade[],int credit_hrs[]); int main() { //Declaring variables string fname,lname; int number_Of_courses; double GPA=0.0; //Setting the precision to two decimal points std::cout << std::setprecision(2) << std::fixed; //getting the firstname entered by the user cout<<"Enter the First name:"; cin>>fname; //getting the lastname entered by the user cout<<"Enter the Last name:"; cin>>lname; //getting the no of courses taken entered by the user cout<<"Enter the no of courses taken :"; cin>>number_Of_courses; //Creating the arrays which hold letter grades and credit hours string letterGrade[number_Of_courses]; int credit_hrs[number_Of_courses]; //Getting the letter grades and credit hours for(int i=0;i<number_Of_courses;i++) { cout<<"Enter the letter grade for course#"<<i+1<<":"; cin>>letterGrade[i]; cout<<"Enter the credit hours :";
12th Jul 2020, 10:49 AM
Prince Charming
Prince Charming - avatar