market
Class Participant
java.lang.Object
market.Participant
- Direct Known Subclasses:
- Buyer, Seller
public abstract class Participant
- extends java.lang.Object
This class is an abstract representation of market participants and outlines the basic functions, particularly makeDecision().
- Author:
- tratch
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Participant
public Participant(Player p)
- Parameters:
p
-
getParticipantName
public java.lang.String getParticipantName()
- Returns:
- The participant's name
getPlayer
public Player getPlayer()
- Returns:
- this player
makeDecision
public abstract Decision makeDecision(Market pMarket)
- Parameters:
pMarket
-
- Returns:
- A decision given the market pMarket
setParticipantName
public void setParticipantName(java.lang.String newName)
- Parameters:
newName
-
setPlayer
public void setPlayer(Player player)
- Parameters:
player
-
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object