import java.util.ArrayList;
import java.util.List;

public class Student implements Comparable<Student> {

	String name;
	List<String> classes = new ArrayList<String>();

	public String toString() {
		String tmp = "Student " + name + " takes classes: ";
		for(String c: classes) {
			tmp = tmp + c + " ";
		}
		return tmp;
	}

	public int compareTo(Student o) {
		return name.compareTo(o.name);
	}
	
	public int hashCode() {
		return name.hashCode();
	}
	
	public boolean equals(Object o) {
		if (o instanceof Student) {
			Student other = (Student) o;
			return name.equals(other.name);
		}
		return false;
	}
	
	/*
	public int hashCode() {
		return 7;
	}
	*/
}
