// Person.java // // Informatics 102 Spring 2012 // Assignment #1 // // NOTE: You may not modify this code in any way. All changes to this // class must be introduced by your aspect! public class Person { private String firstName; private String lastName; public Person(String firstName, String lastName) { changeName(firstName, lastName); } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public void changeName(String newFirstName, String newLastName) { if (newFirstName == null || newLastName == null) { throw new IllegalArgumentException("null person names not allowed"); } firstName = newFirstName; lastName = newLastName; } public boolean equals(Object o) { if (o == null) { return false; } Person p = (Person) o; return firstName.equals(p.firstName) && lastName.equals(p.lastName); } }