Programming
Write a static method named graduation that takes a student's GPA, total credit count, and honors credit count as parameters, and returns a String representing that student's graduation status. The total credit count already includes the honors credits. 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 calls to the method and their resulting return values:
You may assume that the GPA will be between 0.0 and 4.0 and that both credit counts will be non-negative integers.
Correct Answer:
Verified
Q1: If/Else Simulation
For each call below to
Q2: Programming
Write a static method named randomRects
Q4: Parameter Mystery
At the bottom of the page,
Q5: While Loop Simulation
For each call below
Q6: Assertions
For each of the five points
Q7: Expressions
For each expression in the left-hand
Q8: Programming
Write a static method named cheerleader that
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents