Skip to content

51 update various classes #73

Merged
merged 6 commits into from
Apr 8, 2026
Merged

51 update various classes #73

merged 6 commits into from
Apr 8, 2026

Conversation

tommyah
Copy link
Member

@tommyah tommyah commented Mar 18, 2026

Updated various classes by implementing the following methods:

Portfolio:

  • GetNetWorth(): Returns the networth of shares as a BigDecimal

Player:

  • GetNetWorth: Returns the networth of shares and money.

Exchange:

  • GetGainers(int limit): Gets limit amount of stock winners since latest price change, sorted by highest winner first.
  • GetLosers(int limit): Gets limit amount of stock losers since latest price change, sorted by lowest price change first.

Stock:

  • GetHistoricalprices(): Returns price history of stock object.
  • GetHighestPrice(): Returns highest price
  • GetLowestPrice(): Returns lowest price
  • GetLatestPriceChange(): Returns latest price change, or 0 if price has not changed.

Also updated the documentation, testing and inlines of various classes.

tommyah added 6 commits March 18, 2026 18:46
Added method for getting gainers and losers since the latest price change.
Added method for getting networth
Changed the formatting (inline) of various classes to satisfy checkstyle. Also updated the documentation a bit.
Added method for getting networth
Added methods for getting historical prices, highest recorded price, lowest recorded price, and latest price change.
Added unit tests for new methods added in previous commits
@tommyah tommyah linked an issue Mar 18, 2026 that may be closed by this pull request
@etsorens etsorens merged commit 3aae11d into main Apr 8, 2026
@tommyah tommyah deleted the 51-update-various-classes branch April 8, 2026 13:07
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update various classes
2 participants