Skip to content

Commit

Permalink
Uses salesPrice from the share object
Browse files Browse the repository at this point in the history
  • Loading branch information
Solveig Natvig committed Feb 27, 2026
1 parent 7136c2a commit 214ea96
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/SaleCalculator.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import java.math.BigDecimal;
import java.util.Formatter.BigDecimalLayoutForm;

public class SaleCalculator {
private BigDecimal purchasePrice;
Expand All @@ -8,7 +7,7 @@ public class SaleCalculator {

public SaleCalculator(Share share) {
this.purchasePrice = share.getPurchasePrice();
this.salesPrice = salesPrice; // Ask about this one...
this.salesPrice = share.getStock().getSalesPrice();
this.quantity = share.getQuantity();
}

Expand Down

0 comments on commit 214ea96

Please sign in to comment.