Skip to content

feat: add game history tracking and average calculation to BasketballPlayerStats#1

Open
jordanceldridge13 wants to merge 1 commit intocode-differently:mainfrom
jordanceldridge13:jordan-dev
Open

feat: add game history tracking and average calculation to BasketballPlayerStats#1
jordanceldridge13 wants to merge 1 commit intocode-differently:mainfrom
jordanceldridge13:jordan-dev

Conversation

@jordanceldridge13
Copy link
Copy Markdown
Collaborator

Object Chosen

I chose BasketballPlayerStats because it models real-world player performance data and allowed me to practice meaningful object behavior beyond simple getters and setters. Basketball statistics naturally support custom methods like recording games and calculating averages, which made it a strong fit for TDD.

JaCoCo Coverage

Current JaCoCo coverage: 92% overall instruction coverage

BasketballPlayerStats: 93%

GameStat: 84%

This exceeds the 80% requirement.

Challenges / Interesting Findings

One interesting challenge was refactoring calculatePointsPerGame() to derive the average from recorded games instead of passing in gamesPlayed. This required introducing a GameStat class and storing game history inside the object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant