Java programming

posted by .

– One Dimensional Array
Consider this example problem: You are given 7 quiz scores of a student. You are to compute the final quiz score, which is the sum of all scores after subtracting the lowest one.
For example, if the scores are
8 7 8.5 9.5 7 5 10
then the final score is 50.

  • Java programming -

    double[] score = {8, 7, 8.5, 9.5, 7, 5, 10};
    Double min = 10; //the highest possible score is 10
    Double total = 0;
    for(int i = 0; i < score.length; i++)
    total += score[i];
    if(score[i] < min)
    min = score[i];
    total -= min;

    System.out.println("Total = " + total);

  • Java programming -

    Oh, all the doubles have to be lower case.

  • Java programming -

    thank you..:)

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Math

    You have a mean score of 86 on 9 quizzes. The teacher decides to drop your lowest quiz score to determine your final quiz mean. After dropping the lowest score, your mean score on the 8 remaining quizzes is 88. What score was dropped?
  2. algebra

    please translate “A student scored five points more on the second quiz than he did the first. He scored eleven points lower on the third quiz than he did the first. If the average of the three quiz scores is 70, what was his score …
  3. algebra

    Use the five steps for problem solving to answer the following question. Please show all of your work. The average of two quiz scores is 81. If one quiz score is six more than the other quiz score, what are the two quiz scores?
  4. Math

    4). At diving competiotion, Jan's first dive received 9 scores that averaged 9.0. To calculate her final score for the dive, the highest and lowest scores were removed and the average was taken of the remaining seven scores. If her …
  5. statistics

    The following are all quiz scores of a student in a statistics course. Each quiz was graded on a 10-point scale. 10,6,7,6,5,8 Assuming that these scores constitute an entire population, find the standard deviation of the population. …
  6. math

    Tim wants his mean (average) quiz score in history class to be 90. His first 3 quiz scores were 86, 92, and 94. What score should he make on the 4th quiz in order to have a mean (average) quiz score of exactly 90?
  7. Math

    I have this question for summer homework: "Mary's quiz scores were 92, 85, 78, 71, 77, and 80. She says she had an average of 92 for her quiz scores. Which term best describes her average score?
  8. programming

    Write a program which allows user to enter 10 student names and scores for Java programming 1 and Java programming 2. Allow user to choose which course they want to enter the record for. Use the loop to ask input from user. The program …
  9. math

    Mary's quiz scores were 92 85 78 92 71 77 and 80 she told her mom she had an average score if 92 for her quiz scores.which term best Describes Her Average Score ?
  10. Csb

    A student obtained the following quiz scores: 90, 85, 93, and 78. What should be the minimum score he has to obtain in the fifth quiz to have an average of at least 80.

More Similar Questions