public class Person { String firstName; String lastName; int age; char gender; boolean retired; Address address; // This is the zero-parameter constructor public Person() { firstName = "UNKNOWN"; lastName = "UNKNOWN"; gender = '?'; retired = false; age = 0; address = null; } // This is a 4-parameter constructor public Person(String f, String l, int a, char g) { firstName = f; lastName = l; age = a; gender = g; retired = false; address = null; } // This is another 4-parameter constructor public Person(String f, String l, char g, boolean r) { firstName = f; lastName = l; gender = g; retired = r; age = 0; address = null; } // This is a 6-parameter constructor public Person(String f, String l, int a, char g, boolean r, Address d) { firstName = f; lastName = l; age = a; gender = g; retired = r; address = d; } public int computeDiscount() { if ((this.gender == 'F') && (this.age < 13 || this.retired)) return 50; return 0; } public boolean isOlderThan(Person x) { return (this.age > x.age); } public Person oldest(Person x) { if (this.age > x.age) return this; else return x; } public void retire() { this.retired = true; } public void swapNameWith(Person x) { String tempName; // Swap the first names tempName = this.firstName; this.firstName = x.firstName; x.firstName = tempName; // Swap the last names tempName = this.lastName; this.lastName = x.lastName; x.lastName = tempName; } }