Skip to content

Commit

Permalink
Added ExchangeObserver class
Browse files Browse the repository at this point in the history
  • Loading branch information
elisab3 committed May 24, 2026
1 parent 3f2aacc commit 57eec55
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/Model/ExchangeObserver.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package Model;

/**
* Observer interface for the Exchange subject.
* Implement this interface to receive notifications whenever the exchange
* state changes (week advances, a trade is committed).
*/
public interface ExchangeObserver {

/**
* Called by the Exchange after its state has changed.
*
* @param exchange the Exchange that triggered the notification
*/
void onExchangeUpdated(Exchange exchange);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
C:\Users\elisa\Downloads\progdel1\Programmering2_mappe_v26\src\main\java\Controller\StockFileHandler.java
C:\Users\elisa\Downloads\progdel1\Programmering2_mappe_v26\src\main\java\Model\Exchange.java
C:\Users\elisa\Downloads\progdel1\Programmering2_mappe_v26\src\main\java\Model\ExchangeObserver.java
C:\Users\elisa\Downloads\progdel1\Programmering2_mappe_v26\src\main\java\Model\Player.java
C:\Users\elisa\Downloads\progdel1\Programmering2_mappe_v26\src\main\java\Model\Portfolio.java
C:\Users\elisa\Downloads\progdel1\Programmering2_mappe_v26\src\main\java\Model\Purchase.java
Expand Down

0 comments on commit 57eec55

Please sign in to comment.