C++ grade point average calculator with functions specified

May 29th, 2015
SoccerBoss
Category:
Programming
Price: $230 USD

Question description

Write a C++ program that calculates Grade Point Average (GPA) for students with functions specified in the grading criteria. A grade of A is worth 4 points, B is worth 3 points, C is worth 2 points, D is worth 1 points and F is worth 0 points. Grades other than A, B, C, D, and F should not be calculated in GPA. The program should take as many student records as needed. When a grade is entered for a course, credit hours for that course should also be entered so that the GPA can be calculated correctly. For example, if a student has taken 3 courses and earned the following grades:

Course

Grade

Credit Hours

1

A

3.0

2

B

4.5

3

A

1.0

The student's GPA should be calculated as

GPA = (4.0*3.0 + 3.0 * 4.5 + 4.0*1.0) / (3.0+4.5+1.0)

Don't forget to perform data validation. Grades should be 'A', 'B', 'C', 'D', F', 'I', 'P', or 'W' only and credit hours should be in the range of 0 to 6 only.

Grading criteria for this program:

0.5 point - follow Code Requirement posted in Handouts

6 point - create and use the following functions:

    char takeGrade();  //prompt, take, validate and return a letter grade for a course

    double convertGrade(char grade); //convert letter grade received from parameter list to grade point, A = 4.0, B = 3.0, C=2.0, D=1.0, F=1.0)

    double takeCreditHours(); //prompt, take, validate and return the credit hours for a course    

1.5 point - allow user to enter as many students and courses as needed

2 points - calculate GPA correctly


Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Cornell University
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
tinytim47
Dec 1st, 2016
" Wow this is really good.... didn't expect it. Sweet!!!! "
Five Star Tutor
Nov 21st, 2016
" Outstanding Job!!!! "
mixedballz
Nov 17th, 2016
" excellent work as always thanks for the help "
lilmoe415
Nov 8th, 2016
" Thank you, Thank you, for top quality work, this is your guy!! "
darnay
Oct 26th, 2016
" The best tutor out there!!!! "
dontuwannaknow
Oct 17th, 2016
" Excellent work as always thanks so much "
SjSurvivor143
Oct 3rd, 2016
" Thanks for the help. "
Joemoe
Sep 20th, 2016
" <3 it, thanks for saving me time. "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1828 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors