Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The state diving commission wants to computerize the scoring at its diving compe

ID: 3550988 • Letter: T

Question

The state diving commission wants to computerize the scoring at its diving competitions. I have to write a program to automate the scoring of dives. Requirements:

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

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:

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.

Explanation / Answer

static void Main(string[] args)
{
// Data Dictionary
string dName = "";
string dCity = "";
float judgeScore = 0.0f;
int count = 0;
float highest = 0.0f;
float lowest = 99.0f;
float degreeDifficulty = 0.0f;



// Event Name
Console.WriteLine(" EVENT: Diver Competition ");
Console.WriteLine ("");
Console.WriteLine ("");


// Enter Diver's Name, City
Console.Write (" Please Enter Diver's Name: ");
dName = Console.ReadLine();
Console.Write (" Please Enter Diver's City: ");
dCity = Console.ReadLine();

Console.WriteLine(" Judges Please Enter Your Score Value's: 0 - 10 ");

// Enter Judges Score
for (short i = 0; i < 5; i++)
{

Console.Write("Enter Score For Judge #{0}: ", i + 1);
float score = float.Parse(Console.ReadLine());
if (score < 0 || score > 10)
{
Console.Write("Invalid Score -- Please Re-enter " + "(Valid Range: 0 - 10)");
Console.Write("Enter Score For Judge #{0}: ");

}
// accumulation
judgeScore += score;

// count
count++;

// The Highest Score
if (score > highest)
highest = score;

// The Lowest Score
if (score < lowest)
lowest = score;

}

do
{
// ask for degree of difficulty input
Console.Write("Enter the degree of difficulty: ");
degreeDifficulty = Convert.ToSingle(Console.ReadLine());

if (degreeDifficulty < 1.00 || degreeDifficulty > 1.67)
{
Console.WriteLine("Invalid degree of difficulty - Please reenter " +
"(Valid Range: 1.00 - 1.67) ");
Console.WriteLine("Enter the degree of difficulty: ");
degreeDifficulty = Convert.ToSingle(Console.ReadLine());

}
} while (degreeDifficulty < 1.00 || degreeDifficulty > 1.67);


// Display Overall Score
Console.WriteLine("");
Console.WriteLine(" - - - - - - - - - - - - - - - - - ");
Console.WriteLine("- - - - - - - - - - - - - - - - - -");
Console.WriteLine(" - - - - - - - - - - - - - - - - - ");
Console.WriteLine(" Diver: " + dName + " City: " + dCity);
Console.WriteLine(" Degree Of Diffuculty; {0}", degreeDifficulty);
Console.WriteLine(" Overall Score is: {0:f2}", (judgeScore - highest - lowest) / 3 * degreeDifficulty);


// Spaces
Console.WriteLine ("");
Console.WriteLine ("");
Console.WriteLine ("");
// pause
Console.Write (" Press Enter to continue...");
Console.ReadLine();


}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote