Customer - setSSN(ssn); } public Customer() {...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class Customer { private int id; private String SSN; private String name; public int getId() { return id; } public void setId(int id) {this.id = id; } public String getName() { return name; } public void setName(String name) {this.name = name; } public String getSSN() { return SSN; } public void setSSN(String sSN) { SSN = sSN; } public Customer(int id, String ssn, String name) { setId(id); setName(name);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: setSSN(ssn); } public Customer() { this(0,"", ""); } public String toString() { return id + ", " + SSN + ", " + name; } // add any additional methods below as required by the specs public boolean equals(Object obj) { if (obj instanceof Customer) { Customer customer = (Customer)obj; if(getSSN().equals(customer.getSSN())) return true; } return false; } }...
View Full Document

Ask a homework question - tutors are online