Question: Write a program that creates and displays a report of 12 Little League baseball players and their batting averages, listed in order of batting average

Write a program that creates and displays a report of 12 Little League baseball players and their batting averages, listed in order of batting average from highest to lowest. The program should use an array of structures or class objects to store the data, where each structure or object holds the name of a player and their batting average. Make the program modular by having main call on different functions to input the data, sort the data, and display the report.

This is the end of the code: You need to figure out the beginning and middle part.

} /************************************************************ * displayReport * * Called by: main() * * Receives : the team array * * Purpose : Displays the data in the teaam structures. * ************************************************************/ void displayReport(const Player array[]) { cout << " Team Batting Averages "; for (int i = 0; i < TEAM_SIZE; i++) { cout << left << setw(12) << array[i].name << right << setw(5) << 1000 * array[i].avg << endl; } cout << endl; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!