package instance; 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 instanceof Employee)) return false; Employee otherEmployee = (Employee) otherObject; return id == otherEmployee.id; } }