Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

A state wishes to computerize the scoring at its diving competition. The program will input the diver's name, city, the scores of the five judges, and the degree of difficulty. Each diver receives a score (0 - 10) from five judges. The overall score is obtained as follows: all five scores are added. The highest and lowest scores are always assumed to be skewed, or inaccurate, so they are dropped. Divide the resulting score by 3 and multiply that by the degree of difficulty. The degree of difficulty ranges from 1.00 to 1.67. Display the diver's information and overall score.
After all divers have been processed, a summary report listing the number of divers and the average score of the divers will be displayed to the screen.
When writing this lab, use nested loops. A nested loop is where one loop is completely contained in another loop. In an inner loop, you will read the five scores one at a time. Every time you read the score (in the loop), you will compare the score to the highest so far and also to the lowest so far, so that you can determine the highest and lowest scores in addition to adding the scores up one at a time.
You also need to have your program process multiple divers. Put this in an outer loop. After you process the information for one diver, prompt the user if she/he wants to process another diver. Allow the user to type either a "Y" or a "y" to enter another diver's information; otherwise, exit the loop. Write an event summary by calculating and displaying the average score for all divers and the total number of divers participating.
The data being entered by the user needs to be validated. GIGO - Garbage In/Garbage Out. Scores by judges may range between 0 and 10 inclusive. If the user enters an invalid score, display an error message, and prompt for the score again. Keep doing this until the user enters the score correctly. The degree of difficulty may range from 1.00 to 1.67 inclusive. 
Sample output from program
Report to the media
Event: Diving competition
Enter the diver's name: Sue Jones
Enter the diver's city: Dallas
Enter the score given by judge #1: 45
Invalid score - Please reenter (Valid Range: 0 - 10)
Enter the score given by judge #1: 3
Enter the score given by judge #2: 4.5
Enter the score given by judge #3: 6.7
Enter the score given by judge #4: 89
Invalid score - Please reenter (Valid Range: 0 - 10)
Enter the score given by judge #4: 8
Enter the score given by judge #5: 9.2
What was the degree of difficulty? 1.9
Invalid degree of difficulty - Please reenter (Valid Range: 1 - 1.67)
What was the degree of difficulty? 2
Invalid degree of difficulty - Please reenter (Valid Range: 1 - 1.67)
What was the degree of difficulty? 1.2

Diver: Sue Jones, City: Dallas
Overall score was 7.68

Do you want to process another diver (Y/N)? y

Enter the diver's name: Dave Smith
Enter the diver's city: Houston
Enter the score given by judge #1: 5.7
Enter the score given by judge #2: 6.8
Enter the score given by judge #3: 7.6
Enter the score given by judge #4: 8.7
Enter the score given by judge #5: 6.7
What was the degree of difficulty? 1.1

Diver: Dave Smith, City: Houston
Overall score was 7.74
Do you want to process another diver (Y/N)? n
EVENT SUMMARY
Number of divers participating: 2
Average score of all divers: 7.71
Press any key to continue . . .
Step 2: Processing Logic
Using the pseudocode below, write the code that will meet the requirements:
Write report heading
Loop as long as there are divers to process
Input diver's name and city
Initialize highest score, lowest score, and total score

Using a do-while loop input the five judges' scores
Validate the score to ensure it is between 0 and 10
Add score to total
Determine highest and lowest scores

Input and validate the degree of difficulty
Calculate the overall diver's score
Display the diver's information and overall score
Add diver's overall score to the final score
Add 1 to the number of divers
Prompt the user if he or she wants to process another diver
End-Loop
Calculate the average score for all divers
Display the number of divers and the average score for all divers

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9641518

Have any Question?


Related Questions in Computer Engineering

In a competitive market the market demand is qd 60- 6p and

In a competitive market, the market demand is Qd= 60- 6P and the market supply is the Qs= 4P the full economic price under a price ceiling of $3 is:?

Why are some nations economically strong and others

Why are some nations economically strong and others economically weak?

Determine whether or not the following claim is true for

Determine whether or not the following claim is true for all regular expressions r 1  and r 2 . The symbol ≡ stands for equivalence regular expressions in the sense that both expressions denote the same language. (a) (r ...

Question research and provide a write up on available

Question : Research and provide a write up on available routers and switches. The report should include information for at least two router and two switching devices. Included in the write-up should be a description of t ...

Kingston corporation is considering a new machine that

Kingston Corporation is considering a new machine that requires an initial investment of $550,000, including installation costs, and has a useful life of eight years. The expected annual after-tax cash flows for the mach ...

Find minimal dfas for the following languages in each case

Find minimal dfa's for the following languages. In each case prove that the result is minimal. (1) L = {a n bm> :n≥2,m≥1}. (2)L = {a n :n ≥ 0,n ≠ 3} (3) L = {a n :n mod 3 = 0}∪{a n : n mod 5 = 1}

Statistics and facts about smartphonessmartphones mobile

Statistics and facts about Smartphones Smartphones, mobile phones with more advanced computing capabilities and connectivity than regular mobile phones, came onto the consumer market in the late 90s, but only gained main ...

Question after 1 year of launch ride sharing increased a

Question: After 1 year of launch, ride sharing increased a lot resulting in a lot of insertion requests to the database. Consider there is no room to further increase the size of server and changing database is not an op ...

Question suppose you are building a java application for

Question : Suppose you are building a Java application for storing the names and ages of children in a family. Describe the strategy that you would use in order to determine the data types you would need for your applica ...

On microsoft word what would be the advantage of using the

On Microsoft word, what would be the advantage of using the dialog box over setting various tabs directly on the ruler line? In what types of typing tasks would you find using the ruler line helpful?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As