Skip to content

Commit

Permalink
Feat: Added transactioncalculator variable on Transaction class
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyah committed Feb 16, 2026
1 parent 2c2062d commit 1a83e94
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Transaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public abstract class Transaction {

private final int week;

// private final TransactionCalculator;
private final TransactionCalculator calculator;

private boolean commited = false;

Expand All @@ -21,10 +21,11 @@ public abstract class Transaction {
* @param week the current week to perform the transaction under
*/

protected Transaction(final Share share, final int week
/*,final TransactionCalculator calculator*/) {
protected Transaction(final Share share, final int week,
final TransactionCalculator calculator) {
this.share = share;
this.week = week;
this.calculator = calculator;
}

/**
Expand All @@ -43,9 +44,14 @@ public int getWeek() {
return week;
}

/*public getCalculator() {
return calculator;
}*/
/**
* Returns the calculator used by this transaction.
*
* @return calculator
*/
public TransactionCalculator getCalculator() {
return calculator;
}

/**
* Returns whether this transaction has been commited or not.
Expand Down

0 comments on commit 1a83e94

Please sign in to comment.