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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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