Description
You will write a class, Statistics, that calculates basketball statistics. I have given you the main program UNCStats.java that will call your class Statistics. In the same project as UNCStats, you will need to write the class Statistics (in a separate file named Statistics.java) that includes the following methods:
setFieldGoalsMade will take as input an integer (the total number of filed-goals scored) and save the data in a member variable.
setFreeThrowsMade will take as input an integer (the total number of free-throws scored) and save the data in a member variable.
set3PointersMade will take as input an integer (the total number of 3-pointers scored) and save the data in a member variable.
setFieldGoalAttempts will take as input an integer (the total number of field-goal attempts) and save the data in a member variable.
setFreeThrowAttempts will take as input an integer (the total number of free-throw attempts) and save the data in a member variable.
set3PointAttempts will take as input an integer (the total number of 3-point attempts) and save the data in a member variable.
getTotalPoints calculates the total number of points the team has scored and returns the total number of points. (Remember: field-goal = 2 points, free-throw = 1 point, 3-pointer = 3 points)
getFieldGoalPercent calculates and returns the percentage of field-goals the team has made.
getFreeThrowPercent calculates and returns the percentage of free-throws the team has made.
get3PointPercent calculates and returns the percentage of 3-pointers the team has made.
You will need to determine your own private method variables. You should declare and initialize all your variables at the beginning of your class.
Once you have completed the methods, your output should look exactly like this (you should not modify UNCStats.java):Grading
10 points for variable declarationsHow to hand in the assignment