Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Java Programming Help A) You have volunteered to help with the 2021 World Olympics in Tokyo and have been asked to write a program to determine the score for each athlete being judged

Java Programming Help A) You have volunteered to help with the 2021 World Olympics in Tokyo and have been asked to write a program to determine the score for each athlete being judged

Computer Science

Java Programming Help

  1. A) You have volunteered to help with the 2021 World Olympics in Tokyo and have been asked to write a program to determine the score for each athlete being judged. Each event has five judges who can award a score between 0 and 10.  Fractional scores are allowed, such as 7.6. The athlete’s score is calculated by dropping the lowest and the highest scores, then averaging the three remaining scores.  Write a program that uses methods to calculate a contestant’s score.  It should include the following methods:
    • double ge Score() should ask the user for a judge’s score, validate it, then return it to main where it will be store in a variable for each judge. The method should be called by main once for each judge.
    • void calcScore() should calculate and display the average of the three scores that remain after dropping the highest and lowest scores. This method will be called once by main and should be passed the five scores.
    • double getLowest() should get and return the lowest of the five scores and is called by calcScore(), which uses the returned info to determine with score to drop
    • double getHighest() should get and return the highest of the five scores and is called by calcScore(), which uses the returned info to determine with other score to drop.

      Input ValidationDo not accept judge scores lower than 0 or higher than 10.
    • Hints/Tips:
      • One way to validate the score is to use the loop do … while (the scores are invalid)
      • There is an opportunity for more looping, but not until we discuss more advanced concepts
      • This works well using JOptionPane, but it’s your choice
      • I passed 1 through 5 into getScore() so I could display “Judge 1’s score:”, etc.
      • You don’t need to use the same name in every method (better not to), use abbr deeper
        (ex: score1 in main, scr1 in calcScore, s1 in lowScore, etc.). You can use the same name, but it can be confusing because the variables represent the same thing, but are NOT the same.
      • It took me about 40 minutes
    • Rubric:
      • Doesn’t use all four methods properly -2.5 per method
      • Doesn’t calculate the correct score -1
      • Doesn’t print the score -.5
      • Doesn’t validate scores -1

Option 1

Low Cost Option
Download this past answer in few clicks

11.99 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE