Question: Exercise I - Grades.java Jake just got the grade of his third CMPS quiz. Since the online system his university uses to keep track of

 Exercise I - Grades.java Jake just got the grade of his

Exercise I - Grades.java Jake just got the grade of his third CMPS quiz. Since the online system his university uses to keep track of grades is rudimentary, help him figure out what his final grade is, given the weight of each exam, as well as the grade of each exam. Make sure you round the final grade to the nearest tenth (i.e. 1 decimal place). Below you can find an example run: Enter quiz 1 grade and weight: 57 8.23 Enter quiz 2 grade and weight: 83 8.5 Enter quiz 3 grade and weight: 89 0.27 Jake's final grade is 78.6 You should also handle the case where the weights given do not add up to 1 by printing an error message and terminating the program. Note: adding doubles/floats is not 100% accurate due to how they are stored in memory, so checking whether the weights add up to 1 is equivalent to checking whether Math.abs(sum Weights-1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!