1: // @author Frank M. Carrano, Timothy M. Henry
2: // @version 5.0
4: // The method equals in the class Object:
5: public boolean equals(Object other)
6: {
7: return (this == other);
8: } // end equals
10: // The method equals in the class Name:
11: public boolean equals(Object other)
12: {
13: boolean result;
15: if (other instanceof Name)
16: {
17: Name otherName = (Name)other;
18: result = first.equals(otherName.first) &&
19: last.equals(otherName.last);
20: } // end if
22: return result;
23: } // end equals