Problem Description: Player # Player\'s Name GP GS Total Mins Total FG Total FGA
ID: 3802897 • Letter: P
Question
Problem Description: Player # Player's Name GP GS Total Mins Total FG Total FGA 3FG 3FGA FT FTA Off Reb Def Reb PF A TO Stl Blk Total Pts 11 McGowan, Angel 29 28 890 131 331 33 125 84 117 23 57 68 73 91 46 3 379 Design a class named Player with fields for holding a Women’s Basketball player’s statistics. All fields should be private. Write the appropriate mutator and accessor methods for the class’s fields. The class should also have methods that can compute the following: The average minutes played per game by the individual The field goal percentage for the individual The 3 point FG percentage for the individual The free throw percentage for the individual The average rebounds for the individual (25 points) Next, design a class named Roster, which contains an array or ArrayList of Player objects. The class should also have methods that can compute the following: Import a text file with stats information for multiple players (see example above) and create the Player objects. Save all statistics from the array/ArrayList of Player objects to a text file Display, in order, the top 3 individuals who has scored the most total points for the season Display, in order, the top 6 scorers per game on average. Display, in order, the top 3 assists per game on average. Display, in order, the 4 players with the least number of personal fouls. (60 points) Use exceptional handling where appropriate. I will attempt to break your program. (10 points) Write a client (a test class with the main method) to test all the methods and constructors of your classes. The included stats file is for your testing purposes, I will use a completely different file for my testing. So ensure you code is not hard coded for the student file.
Explanation / Answer
define class player:
class player {
char str1 = "GP";
char str2 = "GS";
int Total_min;
int Total_FG;
int Total_FGA;
.............
...................
}
define a method by using:
avg_min_played();
goal_percentage();
three_point_FG_Percentage();
free_throw_percentage();
avg_rebounds();
Make a call of these methods in main function().
Now, define class roaster:
class roaster
{
In this , create array of objects created in player class.
use exception handling like this:
try
{
}
catch
{
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.