import java.util.Date;
public class Cat{
private String name;
private Date birthday;
public Cat(){
}
public void setName(String name){this.name=name;}
public String getName(){return name;}
public void setBirthday(Date birthday){this.birthday=birthday;}
public Date getBirthday(){return birthday;}
public boolean equals(object other){
if(this==other)
return true;
if(!(other instanceof Cat))
return falsel
final Cat cat=(Cat)other;
if(!getName().equals(cat.getName()))
return false;
if(!getBirthday().equals(cat.getBirthday()))
return false;
return true;
}
public int hashCode(){
int result=getName().hashCode();
return result;
}
}