hi, ive never posted here before so im hoping i can get some help with this question i got:
im reading in a database, and its from a file which is nfl stats.. i cant figure out how to organize the data. its a list of a bunch of players and for each person it gives basic stats (height,weight,college,position,etc.)
but then it breaks down there stats depending on what positoin they play. so quarterback could have stats for rushing and passing or rushing and fumbles, and a wide reciever would have rushing and recieving. or recieving and fumbles. or someone might have punt returns and defensive stats.. heres an example of one of them:
# 20 Ed Reed
Position: SS
Height: 5-11
Weight: 200
Born: 09/11/1978
College: Miami (Fla.)
NFL Experience: 3
Baltimore Ravens
DEFENSIVE STATS
Year Team G Total Tckl Ast Sacks Int Yds Avg Lg TD Pass Def
2002 Baltimore Ravens 16 85 71.0 14 1 5 167 33.4 59 0 7
2003 Baltimore Ravens 16 71 59.0 12 1 7 132 18.9 54 1 9
2004 Baltimore Ravens 13 61 54.0 7 2 8 317 39.6 106 1 7
TOTAL 45 217 184.0 33 4 20 616 30.8 106 2 23
PUNT RETURNS
Year Team G No FC Yards Avg Lg TD 20+
2002 Baltimore Ravens 16 0 0 0 --- 0 0 0
2003 Baltimore Ravens 16 5 3 33 6.6 19 0 0
2004 Baltimore Ravens 13 0 0 0 --- 0 0 0
TOTAL 45 5 3 33 6.6 19 0 0
FUMBLES
Year Team G Fum Lost Fum Forced Own Rec Opp Rec Yards Tot Rec TD
2002 Baltimore Ravens 16 1 1 0 0 0 0 0 0
2003 Baltimore Ravens 16 1 1 1 0 0 0 0 0
2004 Baltimore Ravens 13 1 0 2 0 2 44 2 1
TOTAL
i know thats kinda hard to read.. but u can see that theres fumbles defensive stats and punt returns. and terell owns has recieving and rushing.. so how do i make classes to store all these things as im reading them in. do i have to make a different class for each stat title (i.e. rushing, recieving, fumbles, defensive stats, etc.) because they each have different stats that would need dif variables. or do i just make allllll the different kinds of stats private members of just a player class.. i dont get it if someone could help me or if u need me to explain better let me know