@@ -0,0 +1,953 @@
+package UCBmath;%0A%0A/** * A Man that will be matched with a woman in the Stable Marriage Algorithm.%0A%09* Every man has a prefrence list, indicated by an ArrayList.  The rank%0A%09* of the preferences is indicated by the position in the list.%0A%09* Each preference will be a string, which should be indicated by %0A%09* w1, w2,...,wn.%0A%09* @author Alan Ponte%0A%09*/%0A%09%0A%09%0APublic class Man %7B%0A%09%0A%09public static String name;%0A%09%0A%09/* constructor.  sets THIS man's NAME */%0A%09public Man(String Name) %7B%0A%09%09this.name = Name;%09%0A%09%7D%0A%09%0A%09%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 WOMAN as the nth preference */%0A%09public static void addPrefrence(woman)%7B%0A%09%09this.preferenceList.add(woman);%0A%09%7D%0A%09%0A%09/** Returns the Nth prefernce */%0A%09public static String getPreference (n)%7B%0A%09%09return this.preferenceList.get(n);%0A%09%7D%0A%09%0A%09%0A%09%0A%7D%0A

Create Man.java