Package me.thiagorigonatti.capitalgains.core
package me.thiagorigonatti.capitalgains.core
This package contains the core logic of the Capital Gains Calculator application,
including models and classes responsible for processing financial operations
such as buying and selling stocks, calculating profits, and applying tax rules.
-
ClassDescriptionRepresents a single financial operation involving buying or selling assets.Represents a stock position and manages buy and sell operations while tracking cost, shares, and tax calculations.Compute taxes based on a sequence of stock trading operations such as "buy" and "sell".Builder for new instances of
TaxCalculator.Test class for theTaxCalculatorclass, ensuring correct tax calculations for various scenarios including sales with profit, losses, and different cost methods.