package getclass;

public class Employee
{
    private int id;
    private String lastName;
    private String firstName;
    private double salary;
    
    public Employee(int id, String lastName, 
                    String firstName, double salary)
    {
        this.id        = id;
        this.lastName  = lastName;
        this.firstName = firstName;
        this.salary    = salary;
    }
    
    public String toString()
    {
        return "Employee[id=" + id + "][lastName=" + lastName +
               "][firstName=" + firstName + "][salary=" + salary + "]"; 
    }
    
    public boolean equals(Object otherObject)
    {
        if (otherObject == null) return false;
        if (this.getClass() != otherObject.getClass()) return false;
        
        Employee otherEmployee = (Employee) otherObject;
        return id == otherEmployee.id;
    }
}