Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. Revise the Csc20Grader class by implementing the two methods getArrayLowestSc

ID: 3723498 • Letter: 2

Question

2. Revise the Csc20Grader class by implementing the two methods getArrayLowestScorelndex and getAverage to calculate the average of the test scores with two lowest scores dropped. You are given a method called setAnArrayElementToZero which takes an array index position (type int) as input and set the array 's element at that position to zero. (10 points) public class Csc20Grader // The testScores field is a variable that will reference /I an array of test scores. private public Csc20Grader (doublet] scoreArray) double[] testScores; tes t scores scoreArray; = /I getArrayLowestScoreIndex method returns the lowest test // score's array Index. Test scores have values greater // than zero. public int getArrayLowestScoreIndex () 4 L C

Explanation / Answer

public class Csc20Grader { private double[] testScores; public Csc20Grader(double[] testScores) { this.testScores = testScores; } public int getArrayLowestScoreIndex() { double min = testScores[0]; int minInd = 0; for(int i = 0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote