public class Customer implements Cloneable, java.io.Serializable  {
  public Customer() {
    name=null;
    customerID=null;
    password=null;
    shippingAddress=null;
    billingAddress=null;
  }

  public Customer(String name, String customerID, String password, Address shippingAddress, Address billingAddress) {
    this.name=name;
    this.customerID=customerID;
    this.password=password;
    this.shippingAddress=shippingAddress;
    this.billingAddress=billingAddress;
  }

  public String getName() {
    return name;
  }

  public String getCustomerID() {
    return customerID;
  }

  public String getPassword() {
    return password;
  }

  public Address getShippingAddress() {
    return shippingAddress;
  }

  public Address getBillingAddress() {
    return billingAddress;
  }

  public boolean equals(Object other) {
    if (this==other) {
      return true;
    }

    if (other instanceof Customer) {
      Customer otherObj=(Customer) other;
      if (name==null ? otherObj.name!=null : ! name.equals(otherObj.name)) {
        return false;
      }

      if (customerID==null ? otherObj.customerID!=null : ! customerID.equals(otherObj.customerID)) {
        return false;
      }

      if (password==null ? otherObj.password!=null : ! password.equals(otherObj.password)) {
        return false;
      }

      if (shippingAddress==null ? otherObj.shippingAddress!=null : ! shippingAddress.equals(otherObj.shippingAddress)) {
        return false;
      }

      if (billingAddress==null ? otherObj.billingAddress!=null : ! billingAddress.equals(otherObj.billingAddress)) {
        return false;
      }

      return true;
    }

    return false;
  }

  public int hashCode() {
    int hash=0;

    if (name!=null) {
      hash=hash*37+name.hashCode();
    }

    if (customerID!=null) {
      hash=hash*37+customerID.hashCode();
    }

    if (password!=null) {
      hash=hash*37+password.hashCode();
    }

    if (shippingAddress!=null) {
      hash=hash*37+shippingAddress.hashCode();
    }

    if (billingAddress!=null) {
      hash=hash*37+billingAddress.hashCode();
    }

    return hash;
  }

  public Object clone() throws CloneNotSupportedException {
    Customer result=(Customer) super.clone();

    result.shippingAddress=(Address) shippingAddress.clone();
    result.billingAddress=(Address) billingAddress.clone();

    return result;
  }

  public String toString() {
    return customerID+": "+name;
  }

  public void setName(String name) {
    this.name=name;
  }

  public void setCustomerID(String customerID) {
    this.customerID=customerID;
  }

  public void setPassword(String password) {
    this.password=password;
  }

  public void setShippingAddress(Address shippingAddress) {
    this.shippingAddress=shippingAddress;
  }

  public void setBillingAddress(Address billingAddress) {
    this.billingAddress=billingAddress;
  }

  protected String name;
  protected String customerID;
  protected String password;
  protected Address shippingAddress;
  protected Address billingAddress;
}
