-
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.
feat: Adding forgotten factory files
- Loading branch information
martin
committed
Apr 22, 2026
1 parent
eee4b84
commit b5adc64
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/main/java/millions/model/factories/PurchaseFactory.java
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,10 @@ | ||
| package millions.model.factories; | ||
|
|
||
| import millions.model.Purchase; | ||
| import millions.model.Share; | ||
|
|
||
| public class PurchaseFactory extends TransactionFactory { | ||
| public Purchase createTransaction(Share share, int week) { | ||
| return new Purchase(share, week); | ||
| } | ||
| } |
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,10 @@ | ||
| package millions.model.factories; | ||
|
|
||
| import millions.model.Sale; | ||
| import millions.model.Share; | ||
|
|
||
| public class SaleFactory extends TransactionFactory { | ||
| public Sale createTransaction(Share share, int week) { | ||
| return new Sale(share, week); | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
src/main/java/millions/model/factories/TransactionFactory.java
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,8 @@ | ||
| package millions.model.factories; | ||
|
|
||
| import millions.model.Share; | ||
| import millions.model.Transaction; | ||
|
|
||
| public abstract class TransactionFactory { | ||
| public abstract Transaction createTransaction(Share share, int week); | ||
| } |