The Graduation Problem Many 4-year Universities are on the quarter-credit (rather than semester) system. You are given a student's GPA, total credit count, and honors credit count as input. The total credit count already includes the honors credits. I have already written the run() function. Please declare and define the function getStatus() so that the program works correctly. Write a C++ Program: The graduation status to return is determined by the following rules: • Students must have completed at least 180 credits with a GPA of at least 2.0 to graduate. A student who does not meet both of these constraints should receive a return value of "not graduating". • Students who do have enough credits to graduate and sufficiently high GPAs will receive one of four return values depending on the GPA and number of honors credits: All students with GPAs between 2.0 and 3.6 receive a return value of "graduating". Students with fewer than 15 honors credits receive a return of "cum laude" if their GPA is at least 3.6 but less than 3.8, and a return of "magna cum laude" if their GPA is at least 3.8. Students with 15 or more honors credits receive a return of "magna cum laude" if their GPA is at least 3.6 but less than 3.8, and a return of "summa cum laude" if their GPA is at least 3.8. Here are some example inputs and their resulting output: • For input of 3.87, 178, 16 the output is "not graduating" • For input of 1.5, 199, 30 the output is "not graduating" • For input of 2.7, 380, 50 the output is "graduating" • For input of 3.62, 200, 200 the output is "magna cum laude" • For input of 3.93, 185, 0 the output is "magna cum laude" For input of 3.85, 190, 15 the output is "summa cum laude" You can assume that GPA will be between 0.0 and 4.0 and that both credit counts will be non-negative integers. You'll find the starter code in the download folder. To solve this problem, work step-by-step as we've done in the past. Use make test to test your code, make test or make run to run any student tests.
The Graduation Problem
Many 4-year Universities are on the quarter-credit (rather than semester) system. You are given a student's GPA, total credit count, and honors credit count as input. The total credit count already includes the honors credits.
I have already written the run() function. Please declare and define the function getStatus() so that the program works correctly. Write a C++ Program:
The graduation status to return is determined by the following rules:
• Students must have completed at least 180 credits with a GPA of at least
2.0 to graduate. A student who does not meet both of these constraints
should receive a return value of "not graduating".
• Students who do have enough credits to graduate and sufficiently high
GPAs will receive one of four return values depending on the GPA and
number of honors credits:
All students with GPAs between 2.0 and 3.6 receive a return value of
"graduating".
Students with fewer than 15 honors credits receive a return of "cum
laude" if their GPA is at least 3.6 but less than 3.8, and a return of
"magna cum laude" if their GPA is at least 3.8.
Students with 15 or more honors credits receive a return of "magna
cum laude" if their GPA is at least 3.6 but less than 3.8, and a return of
"summa cum laude" if their GPA is at least 3.8.
Here are some example inputs and their resulting output:
• For input of 3.87, 178, 16 the output is "not graduating"
• For input of 1.5, 199, 30 the output is "not graduating"
• For input of 2.7, 380, 50 the output is "graduating"
• For input of 3.62, 200, 200 the output is "magna cum laude"
• For input of 3.93, 185, 0 the output is "magna cum laude"
For input of 3.85, 190, 15 the output is "summa cum laude"
You can assume that GPA will be between 0.0 and 4.0 and that both credit counts will
be non-negative integers. You'll find the starter code in the download folder. To solve
this problem, work step-by-step as we've done in the past.
Use make test to test your code, make test or make run to run any student tests.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images