//Dept.java

package hr;

public class Dept implements java.io.Serializable
{

    private Integer deptNo;
    private String deptName;

    public Dept(Integer deptNo, String deptName)
    {
	this.deptNo = deptNo;
	this.deptName = deptName;
    }

    public Integer getDeptNo() {
	return deptNo;
    }

    public void setDeptNo(Integer deptNo) {
	this.deptNo = deptNo;
    }

    public String getDeptName() {
	return deptName;
    }

    public void setDeptName(String deptName) {
	this.deptName = deptName;
    }

    public boolean equals(Object other)
    {
        if(other instanceof Dept) {
            Dept dept = (Dept)other;
            if (deptNo.equals(dept.getDeptNo()) &&
                deptName.equals(dept.getDeptName())) {
                return true;
            }
        }
        return false;
    }

}
