package foo.bar.foobar;
public class Student implements java.io.Serializable{
    private int sid;    //学号
    private String name;    //名字
    private String school;      //学校
   
    //获取学号
    public int getSid() {
        return sid;
    }
   //设置学号
    public void setSid(int sid) {
        this.sid = sid;
    }
    //获取名字
    public String getName() {
        return name;
    }
    //设置名字
    public void setName(String name) {
        this.name = name;
    }
   //获取学校名称
    public String getSchool() {
        return school;
    }
   //设置学校名称
    public void setSchool(String school) {
        this.school = school;
    }
//默认的构造函数，必须提供
    public Student() {
    }

    public Student(int sid) {
        this.sid = sid;
    }

    public Student(int sid, String name, String school) {
        this.sid = sid;
        this.name = name;
        this.school = school;
    } 
 	 public boolean equals(Object obj) {
        Student student=(Student)obj;
        return sid == student.getSid() && name.equals(student.getName()) && school.equals(student.getSchool());
    }
}
