Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write a program for the following c++ code. ALL FUNCTION HEADERS MUST HAVE ONE COMMENT ABOVE EACH ONE TO DESCIBE THE PURPOSE OF THE

Please write a program for the following c++ code. ALL FUNCTION HEADERS MUST HAVE ONE COMMENT ABOVE EACH ONE TO DESCIBE THE PURPOSE OF THE FUNCTION. PLEASE USE MULTIPLE FUNCTIONS. The golf coach of a local high school team would like to hire you to write a program that calculates the average of 5 students on the co-ed golf team after playing three rounds of golf. He would like the program to calculate the average for each student as well as the average for each round. The scores for each student in each round of golf are in the chart below. Also determine the best student average (in golf, the lower scores are better) recorded by the golfers.

Use main( ) as the driver function. Write functions to accomplish the following tasks:

Prompt and read the names of the 5 students and store them in a one-dimensional array of strings.

Prompt for the scores for each player in each round and store these values into a two-dimensional array. (See pages 420 - 421 in course textbook or Slides 55 -57 in the Chapter 7 PowerPoint Lecture Notes Arrays posted in the Blackboard Lecture Notes link.)

Compute the average score for each student for the 3 rounds of golf and stores these values into a one-dimensional array. (See pages 424 in course textbook or Slides 64 -65 in the Chapter 7 PowerPoint Lecture Notes Arrays posted in the Blackboard Lecture Notes link.)

Compute the average score for each round of golf and store these values into a one-dimensional array. (See page 425 in course textbook or Slides 66 -67 in the Chapter 7 PowerPoint Lecture Notes Arrays posted in the Blackboard Lecture Notes link.)

Determine the best student average recorded from the three rounds of golf. (Use the FindSmallest Function from a previous lab assignment). Display the information in a table format as shown below. Display all averages to a tenth of a decimal.

Player Round 1 Round 2 Round 3 Ave./Student

Mike Sims 78 76 74 76.0

Paula Hill 71 78 75 74.7

Steve Jones 72 75 73 73.3

Jill Burton 73 74 72 73.0

Lee Smith 74 79 78 77.0

Ave./Round 73.6 76.4 74.4

was the best recorded student average from the rounds of golf.

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions