package stableMatching;

/** * A Woman that will be matched with a woman in the Stable Marriage Algorithm.
	* Every Woman has a prefrence list, indicated by an ArrayList.  The rank
	* of the preferences is indicated by the position in the list.
	* Each preference will be a string, which should be indicated by 
	* m1, m2,...,mn.
	* @author Alan Ponte
	*/
	
	
public class Woman {
	
	private static String name;
	
	/* Constructor.  Sets THIS Woman's NAME. */
	public Woman(String Name) {
		this.name = Name;
	}
	private ArrayList <String> preferenceList = new ArrayList <String>();
	boolean mathced = false;
	
	/** Returns TRUE iff given man is matched to any woman */
	public bool isMatched(){
		return matched;	
	}
	
	/** Adds the MAN as the Nth preference */
	public static void addPrefrence(man){
		this.preferenceList.add(man);
	}

	
	/** Returns the Nth prefernce */
	public static String getPreference (n){
		return this.preferenceList.get(n);
	}
	
	
	
}

@@ -17,16 +17,37 @@
 tching;%0A
+import java.util.Map;
 %0A/** * A
@@ -397,577 +397,201 @@
 man 
-%7B%0A%09%0A%09private static String name;%0A%09%0A%09/* Constructor.  Sets THIS Woman's NAME. */%0A%09public Woman(String Name) %7B%0A%09%09this.name = Name;%0A%09%7D%0A%09private ArrayList %3CString%3E preferenceList = new ArrayList %3CString%3E();%0A%09boolean mathced = false;%0A%09%0A%09/** Returns TRUE iff given man is matched to any woman */%0A%09public bool isMatched()%7B%0A%09%09return matched;%09%0A%09%7D%0A%09%0A%09/** Adds the MAN as the Nth preference */%0A%09public static void addPrefrence(man)%7B%0A%09%09this.preferenceList.add(man
+extends Agent %7B%0A%09%0A%09public Woman(String Name, Map%3CAgent, Integer%3E preferences) %7B%0A%09%09super(Name, preferences
 );%0A%09%7D%0A
-%0A
 %09%0A%09/** 
-Returns the Nth prefernce */%0A%09public static String getPreference (n)%7B%0A%09%09return this.preferenceList.get(n
+A new Woman whose name is NAME.*/%0A%09public Woman(String Name) %7B%0A%09%09super(Name
 );%0A%09

Update Woman.java