Question: Write a program that stores the following data about a soccer player in a structure: Players Name as String Players Number as Short Int (or

Write a program that stores the following data about a soccer player in a structure:

Players Name as String

Players Number as Short Int (or char)

Points Scored by Player as Short Int

The program should keep an array of 20 of these structures. Each element is for a different player on a team. When the program runs it should ask the user to enter the data for each player. It should then show a table that lists each players number, name, and points scored. The program should also calculate and display the total points earned by the team. The number and name of the player who has earned the most points should also be displayed.

Input Validation: Do not accept negative values for players numbers or points scored.

Program must also:

Use pointers for your array of structures with dereferencing (ie. *(array_name + index) technique) instead of [ ] operator.

Ask the user if they would like to sort array by name, player number or total points scored.

Write the array of structures to a text file (ask the user to enter a file name for the file to output).

Write the array of structures to a binary file (ask the user to enter a file name for the file to output).

Write a second program to read in a text or binary file from items #3 or #4, using binary search to find a player by name and output the player's information (name, number, and total points)

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!