package net;

public class Product {
  private String name;
  private float price;
  private int productCode;

  public Product(String _name,
                 float _price,
                 int _productCode) {
    name = _name;
    price = _price;
    productCode = _productCode;
  }

  public String toString() {
    return "name:" + name
        + "\tprice:$" + price
        + "\tproductCode:" + productCode;
  }

  public float getPrice() {
    return price;
  }

  public String getName() {
    return name;
  }

  public int getProductCode() {
    return productCode;
  }

  public boolean equals(Product p) {
    return
        p.getProductCode() == productCode;
  }

}