Question: Kotlin Create a method named catchupGradingWithSkips that accepts an array of Double values and implements the following catch-up grading policy. Given a score on Quiz

Kotlin

Create a method named catchupGradingWithSkips that accepts an array of Double values and implements the following catch-up grading policy. Given a score on Quiz N, if a student both took Quiz N and does better on the next quiz (Quiz N + 1), then you should replace their score on Quiz N with the average of their score on Quiz N and their score on Quiz N + 1. Otherwise, their score on Quiz N is unchanged. If a student does not take a quiz, their score is recorded as -1.0. Return the number of times that you apply the catchup grading policyspecifically that the student took the previous quiz and does strictly better on the next quiz than they did on the previous one.

Scores are stored in the array in order. So, given an array with the scores {100.0, 80.0, 90.0}, you would modify the array to contain {100.0, 85.0, 90.0}, and return 1. And, given an array with the scores {100.0, -1.0, 90.0}, you would not modify the array and return 0, because in this case the student did not take the second quiz.

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!