1// constructors and other data fields not shown// returns the average (arithmetic mean)private double average (int [] scores){ /* implementation not shown */}// returns true if the student has...


utogwVUfWNJvmW7MGwYrTyRrJDu-ioEw19ELum82_RuHi-A/formResponse?pli=1<br>Consider a grade-averaging scheme in which the final average of a student's scores is computed differently<br>from the traditional average if the student has completed a make-up assignment: drop the lowest score and<br>compute the new average.<br>The following table shows several example scores and how they would be average using the scheme<br>described above.<br>Student Scores<br>Make-Up Completed?<br>Final Average<br>50, 50, 20, 80, 53<br>No<br>(50 + 50 + 20 + 80 + 53)/5.0 = 50.6<br>30, 80, 85, 87<br>Yes<br>(80 + 85+ 87)/3.0 = 84.0<br>75, 85, 10, 60, 90<br>Yes<br>(75 + 85+ 60 + 90)/4.0 = 77.5<br>Consider the following incomplete StudentRecord class. Each studentRecord object stores a list of that<br>student's scores and contains methods to compute that student's final average.<br>public class StudentRecord<br>private int [] scores; // contains scores.length values<br>// scores.length > 1<br>// constructors and other data fields not shown<br>// returns the average (arithmetic mean)<br>private double average (int [] scores)<br>{ /* implementation not shown */}<br>// returns true if the student has completed a make-up<br>private boolean makeUpCompleted ()<br>{ /* implementation not shown */ }<br>// if the student has completed the make-up, return the<br>// average of all numbers except the lowest one;<br>// otherwise, return the average of all numbers<br>public double finalAverage ()<br>// your code goes here<br>Write the studentRecord method finalAyerage (), You MUST call the methods average () and<br>makeUpCompleted () in the finalAverage () method.<br>Your answer<br>13<br>otv<br>MacBook Oir<br>

Extracted text: utogwVUfWNJvmW7MGwYrTyRrJDu-ioEw19ELum82_RuHi-A/formResponse?pli=1 Consider a grade-averaging scheme in which the final average of a student's scores is computed differently from the traditional average if the student has completed a make-up assignment: drop the lowest score and compute the new average. The following table shows several example scores and how they would be average using the scheme described above. Student Scores Make-Up Completed? Final Average 50, 50, 20, 80, 53 No (50 + 50 + 20 + 80 + 53)/5.0 = 50.6 30, 80, 85, 87 Yes (80 + 85+ 87)/3.0 = 84.0 75, 85, 10, 60, 90 Yes (75 + 85+ 60 + 90)/4.0 = 77.5 Consider the following incomplete StudentRecord class. Each studentRecord object stores a list of that student's scores and contains methods to compute that student's final average. public class StudentRecord private int [] scores; // contains scores.length values // scores.length > 1 // constructors and other data fields not shown // returns the average (arithmetic mean) private double average (int [] scores) { /* implementation not shown */} // returns true if the student has completed a make-up private boolean makeUpCompleted () { /* implementation not shown */ } // if the student has completed the make-up, return the // average of all numbers except the lowest one; // otherwise, return the average of all numbers public double finalAverage () // your code goes here Write the studentRecord method finalAyerage (), You MUST call the methods average () and makeUpCompleted () in the finalAverage () method. Your answer 13 otv MacBook Oir
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here