Page 1 of 1

In this project, use two dimensional arrays to solve the following problem: An assistant soccer coach keeps track of the

Posted: Tue Jul 12, 2022 8:21 am
by answerhappygod
In this project, use two dimensional arrays to solve thefollowing problem: An assistant soccer coach keeps track of the top10 high school soccer players points after 10 regular season gamesto produce the statistics for college recruitment. We are helpinghim by implement a program to help him enter the points andproduces the report. The players will be indexed from 0 to 9 whilethe games will be indexed from 0-9 too. The coach needs to be ableto enter the points for each player after each game.
Therefore, we are writing a program that reads all thisinformation of these ten players after 10 games and summarize thetotal points by each player. Here are some steps that you need togo through:
Step 1:
Please use eclipse to create the followings:
create a package and name it as “Project1”. Under Projectpackage, create a class called SoccerStats
Step 2:
2.1 Declare data member named Stats as a 2Darray with 10 rows and 11 columns. Each row will correspond to oneplayer. Each column will correspond to one game except the lastcolumn would be total points.
2.2 Declare a constructor with no parameters in which youinitialize that 2D array to be zero.
2.2 Declare two methods: void getData() and void report().
2.3 Implement the getData function in which you read the data inand put it in the 2D array Stats. You will be askingusers to enter three values at one: player number (0-9), game(0-9), and points for each game (any integers). Player number willserve as row index, game will serve as column index. The Stats[rownumber][column number] = points.
2.4 Implement the report function in which you display the valueof this array Stats and compute total points for each player. Printout the player with highest points.
2.5. Add the main method to test the program by calling getDatamethod first and then call the method report.