⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 product.java

📁 网上商城源代码!实现了书店的列表和增加
💻 JAVA
字号:
package bookstore.model.eneity;import java.io.Serializable;public class Product implements Serializable{	private int id;	private String name;	private String description;	private double price;		public Product(){}	public Product(String name,String description,double price){		this.name=name;		this.description=description;		this.price=price;			}	public void setId(int id) {		this.id = id;	}	public Integer getId(){		return this.id;	}	public void setName(String name){		this.name=name;	}	public String getName(){		return this.name;	}	public void setDescription(String d){		this.description=d;			}	public String getDescription(){		return this.description;	}	public void setPrice(double p){		this.price=p;	}	public double getPrice(){		return this.price;	}	public boolean equals(Object obj){		if(!(obj instanceof Product)) return false;		Product p=(Product) obj;		return p.getName().equals(name)||p.getId().equals(id);	}	public int hashCode(){		return name.hashCode()^id;	}		}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -