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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started