/* Author: James Tam Version: Feb. 4, 2021 Learning objective: defining an equals() method. It should determine if the state of two Person objects are identical (compares variable attributes and the String comparison is case insensitive). */ public class Person { public static final String DEFAULT_NAME = "No name"; public static final int DEFAULT_AGE = -1; private int age; private String name; public Person() { this(DEFAULT_NAME,DEFAULT_AGE); } public Person(String newName, int newAge) { setName(newName); setAge(newAge); } //equals() //Return: boolean depending upon whether the state of two objects are identical. //Argument: a reference to the comparator object public boolean equals(Person anotherPerson) { boolean result = true; //Students write your solution here. return(result); } public int getAge() { return(age); } public String getName() { return(name); } public void setAge(int newAge) { age = newAge; } public void setName(String newName) { name = newName; } }