Question: a. Draw the hierarchy chart and design the logic for a program needed by the manager of the Stengel County softball team, who wants to

a. Draw the hierarchy chart and design the logic for a program needed by the manager of the Stengel County softball team, who wants to compute slugging percentages for his players. A slugging percentage is the total bases earned with base hits divided by the player’s number of at-bats. Design a program that prompts the user for a player jersey number, the number of bases earned, and the number of at-bats, and then displays all the data, including the calculated slugging average. The program accepts players continuously until 0 is entered for the jersey number. Use appropriate modules, including one that displays End of job after the sentinel is entered for the jersey number.

b. Modify the slugging percentage program to also calculate a player’s on-base percentage. An on-base percentage is calculated by adding a player’s hits and walks, and then dividing by the sum of at-bats, walks, and sacrifice flies. Prompt the user for all the additional data needed, and display all the data for each player.

c. Modify the softball program to also compute a gross production average (GPA) for each player. A GPA is calculated by multiplying a player’s on-base percentage by 1.8, then adding the player’s slugging percentage, and then dividing by four.

Step by Step Solution

3.41 Rating (145 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Hierarchy chart Flowchart Pseudocode start Declarations num jerseyNumber num numBasesEarned num numAtBats num sluggingPercent string NUMPROMPT Enter the players jersey number string BASESPROMPT Ente... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Logic & Design Questions!