Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need this in C# based on the following pseudocode Your mission: The state diving commission wants to computerize the scoring at its diving competitions. You've

Need this in C# based on the following pseudocode

Your mission: The state diving commission wants to computerize the scoring at its diving competitions. You've been hired to write a program to automate the scoring of dives. Following are the requirements for the program.

After each dive, the user will be prompted to enter the:

diver's name;

diver's city;

degree of difficulty (ranges from 1.00 to 1.67); and

scores from five judges (scores can range from 0 to 10).

If an invalid score is entered, an error message will be displayed. The user will be prompted for the score repeatedly until a valid score is entered.

The program will then display the following information:

Diver's name

Diver's city

Dive final score: This is calculated by dropping the highest and lowest of the five judges' scores. The remaining three scores are added together, and the result is divided by 3 and then multiplied by the degree of difficulty.

The program will then prompt the user if she/he wants to process another dive. The user can type "Y" or "y" to continue, and "N" or "n" to quit.

Declare and initialize variables: name, city, judge score, highest score, lowest score, total score Loop while there are dives to process Initialize highest score and lowest score and total score Get diver's name and city Get degree of difficulty Loop to validate input Use a while loop to enter the degree of difficulty again if not in the proper range End Loop Loop five times to get judges' scores Ask for and enter a judges score Loop to Validate input use a while loop to input another score if it is not between 0 and 10 End Loop Update highest and lowest scores if need be If score is greater than highest assign score to highest If score is less than lowest assign score to lowest Increment the judgeCount variable Add score to total score End Loop Calculate the final score (subtract highest and lowest scores from total score, divide by 3, multiply by degree of difficulty) Display the diver's information and final dive score Prompt the user if he or she wants to process another diver End-Loop

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions

Question

1. Television more Over watching faceing of many problems ?

Answered: 1 week ago

Question

Is there a link between chronic stress and memory function?

Answered: 1 week ago