-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Solveig Natvig
committed
Feb 28, 2026
1 parent
7df9db2
commit ffe1266
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| public abstract class Transaction { | ||
| private Share share; | ||
| private int week; | ||
| private TransactionCalculator calculator; | ||
| protected boolean committed; | ||
|
|
||
| protected Transaction(Share share, int week, TransactionCalculator calculator) { | ||
| this.share = share; | ||
| this.week = week; | ||
| this.calculator = calculator; | ||
| } | ||
|
|
||
| public Share getShare() { | ||
| return this.share; | ||
| } | ||
|
|
||
| public int getWeek() { | ||
| return this.week; | ||
| } | ||
|
|
||
| public TransactionCalculator getCalculator() { | ||
| return this.calculator; | ||
| } | ||
|
|
||
| public boolean isCommitted() { | ||
| return this.committed; | ||
| } | ||
|
|
||
| public abstract void commit(Player player); | ||
|
|
||
| } |