Calculate and display a contestants score

Assignment Help Computer Engineering
Reference no: EM132091630

A particular talent competition has 5 judges, each of whom awards a score between 0 and 10 to each performer. Fractional scores, such as 8.3, are allowed.

A performer's final score is determined by dropping the highest and lowest score received, then averaging the 3 remaining scores.

Write a program that uses these rules to calculate and display a contestant's score. It should include the following functions:

• void getJudgeData() should ask the user for a judge's score, store it in a reference parameter variable, and validate it. This function should be called by main once for each of the 5 judges.

• double calcScore() should calculate and return the average of the 3 scores that remain after dropping the highest and lowest scores the performer received. This function should be called just once by main, and should be passed the 5 scores.

The last two functions, described below, should be called by calcScore, which uses the returned information to determine which of the scores to drop.

• int findLowest() should find and return the lowest of the 5 scores passed to it.

• int findHighest() should find and return the highest of the 5 scores passed to it.

Input Validation: Do not accept judge scores lower than 0 or higher than 10.

Implement the functions exactly as specified, other than correction of the following error: findLowest and findHighest should have return type double, not int.

Reference no: EM132091630

Questions Cloud

Advancing medical science : Both the Tuskegee study and the Willowbrook study produced research data that was beneficial to advancing medical science.
Create a program that converts user input in dollars : Create a program that converts user input in Dollars to Euro, Yen, or Peso.Prompt the user to enter $ amount.
Proposed solutions and new policy framework : What are your opinions on the proposed solutions and new policy framework? Do you have any suggestions?
Downward flow of information : Using the "downward flow of information" concept, discuss the HazCom responsibilities of chemical producers
Calculate and display a contestants score : A performer's final score is determined by dropping the highest and lowest score received, then averaging the 3 remaining scores.
How would you distinguish quality management from qi : How would you distinguish quality management from QI in healthcare? Please provide some examples.
Elements of reasoning and intellectual standards option : Elements of Reasoning and Intellectual Standards Option A Using the 8 elements of reasoning that were outlined in week 2 (Purpose, problem, information
Decision making process : What Impact do you think technology can play in the decision making process? In which steps could technology be useful?
Write a recursive function sum-odds that takes a non-empty : Write a recursive function sum-odds that takes a non-empty list of integers as an argument and returns the sum of only the odd integers in the list.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Which computer platforms are the safest

Which computer platforms are the safest? Why is adaptive security important? Note that the requirement is to post your initial response no later than Wednesday.

  Analyze the time complexity of parallel algorithms

CSNB594 - Parallel Computing - Design parallel code to solve a given problem, determine computational bottlenecks and optimize the performance of the code

  Why are three-state gates used in an input interface

Describe the advantages of the open-collector gate over the three-state gate when the application entails multiple sources on a control signal.

  Calculates a result needed for a physics lab on ballistics

Program that calculates a result needed for a physics lab on ballistics. Using the angle of the launch and the initial velocity, the program will calculate how far the object traveled.

  Discuss inheritance hierarchy

Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of trees (oak, elm, etc.).

  Develop prototypes for web scraping methods dom parsing and

create prototypes for web scraping techniques dom parsing amp regular expression matching. prototypes focus on series

  Importance of monitoring system performance

Describe in your own words the purpose of all user interfaces, whether command or menu driven and explain the importance of monitoring system performance and why Windows make this information available to the user.

  Define what data management considerations

What data management considerations are there with this acquisition strategy

  Proposing the reasonable values

Propose the reasonable values for items in risk register for this asset and threat, and give the justifications for your choices.

  What are the two basic forms of compression

What are the two basic forms of compression? Run-length encoding can be used to compress what kind(s) of data?

  Program which operates as a generic simple json parser

Create a program which operates as a generic Simple JSON parser. Simple JSON is our version of JSON that only supports variables with values of type: String or Simple JSON.

  A computer processes jobs on the first-come first-serve

a computer processes jobs on a first-come first-serve basis in a time-sharing environment. the jobs have poisson

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd