@@ -0,0 +1,1005 @@
+package stableMatching;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A/** An Agent in the Stable Matching algorithm.%0A * @author Alan Ponte*/%0Aabstract class Agent %7B%0A%09%0A%09/** A new agent whose name is NAME.*/%0A%09public Agent(String Name) %7B%0A%09%09_name = Name;%0A%09%09%0A%09%7D%0A%09%0A%09/** A new Agent whose name is NAME, %0A%09 *  and whose preference list is PREFERENCES.*/%0A%09public Agent(String Name, Map%3CAgent, Integer%3E preferences) %7B%0A%09%09_name = Name;%0A%09%09_prefs = preferences;%0A%09%7D%0A%09%0A%09/** Return's the preference list of THIS Agent.*/%0A%09public Map%3CAgent, Integer%3E getPreferences() %7B%0A%09%09return _prefs;%0A%09%09%0A%09%7D%0A%09%0A%09/** Sets THIS Agent's Name to NAME.*/%0A%09public void setName(String Name) %7B%0A%09%09_name = Name;%0A%09%7D%0A%09%0A%09/** Sets THIS Agent's preferences to PREFS.*/%0A%09public void setPreferences(Map%3CAgent, Integer%3E prefs) %7B%0A%09%09_prefs = prefs;%0A%09%09%0A%09%7D%0A%09%0A%09@Override%0A%09public String toString() %7B%0A%09%09return %22Agent %22 + _name;%0A%09%09%0A%09%7D%0A%09%0A%09/** THIS Agent's name.*/%0A%09private String _name;%0A%09%0A%09%0A%09/** THIS agent's preference map.*/%0A%09private Map%3CAgent, Integer%3E _prefs;%0A%09%0A%7D%0A

Create Agent.java