Skip to content

Commit

Permalink
Adding salesPrice and quantity update to calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Mar 6, 2026
1 parent 945cc6c commit 292c14b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/millions/calculators/SaleCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public class SaleCalculator implements TransactionCalculator {
public SaleCalculator(Share share) {
super();
this.purchasePrice = share.getPurchasePrice();
this.salesPrice = share.getStock().getSalesPrice();
this.quantity = share.getQuantity();
}

@Override
Expand Down

0 comments on commit 292c14b

Please sign in to comment.