/* This class represents a Transcation. * NOTE: This is NOT built to the requirements ofAssignment 2 * * Notice how the static counter is being used to assign unique * transaction numbers */ public class Person{ private static int nextSocialInsuranceNumber = 100000000; //initial value of transaction numbers private String name = "UNNAMED"; private int sinNumber; public Person(String aName){ sinNumber = nextSocialInsuranceNumber; nextSocialInsuranceNumber++; name = aName; } public boolean equals(Object anObject){ if(!(anObject instanceof Person) ) return false; return name.equals(((Person) anObject).getName()); } public String getName(){return name; } public String getSinNumber(){return name; } public String toString(){ return name; } } //end class Person