Question: Modify the spreadsheet code fragment in the text to compute a weighted average of the rows, where the weights of each exam score are in

Modify the spreadsheet code fragment in the text to compute a weighted average of the rows, where the weights of each exam score are in a one-dimensional array weights[]. For example, to assign the last of the three exams in our example to be twice the weight of the first two, you would use double[] weights = { 0.25, 0.25, 0.50 };

Note that the weights should sum to 1.

Step by Step Solution

3.46 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure lets assume weve got a twodimensional array scores which represents the scores of the students ... View full answer

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 Introduction To Programming Questions!