Develop the logic for a program that accepts a players name


Problem

In golf, par represents a standard number of strokes a player will need to complete a hole. Instead of using an absolute score, players can compare their scores on a hole to the par figure and determine whether they are above or below par. Families can play nine holes of miniature golf at the Family Fun Miniature Golf Park. So that family members can compete fairly, the course provides a different par for each hole based on the player's age. The par figures are shown in the following table:

 

Holes

Age

1

2

3

4

5

6

7

8

9

4 and under

8

8

9

7

5

7

8

5

8

5-7

7

7

8

6

5

6

7

5

6

8-11

6

5

6

5

4

5

5

4

5

12-15

5

4

4

4

3

4

3

3

4

16 and over

4

3

3

3

2

3

2

3

3

a. Develop the logic for a program that accepts a player's name, age, and nine-hole score as input. Display the player's name and score on each of the nine holes, with one of the phrases "Over par", "Par", or "Under par" next to each score.

b. Modify the program at the end of the golfer's report, the total score is displayed. Include the player's total score in relation to par for the entire course.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Develop the logic for a program that accepts a players name
Reference No:- TGS02647311

Expected delivery within 24 Hours