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

📄 product.java

📁 我做的ssd9 exercise6 的答案。分享
💻 JAVA
字号:
/**
 * Product is the entity bean for ProductController to use.
 * A product object encapsulates the information of a product.
 * This information includes:
 * <ul>
 * <li>productid
 * <li>product's name
 * <li>product's picture address
 * <li>product's description
 * <li>product's weight;
 * <li>product's price;
 * <li>how many this product purchase by current user. by default is 0.
 * </ul>
 */ 


public class Product {
	private int id;
	private String name;
	private String picture;
	private String description;
	private double weight;
	private double price;

	/**
     * Set productid.
     *
     * @param productid  the value of productid
     */
	public void setProductid(int id){
		this.id=id;
	}
	/**
     * Set name.
     *
     * @param name  the text of name
     */
	public void setName(String name){
		this.name=name;
	}
	/**
     * Set picture address.
     *
     * @param picture  the text of picture
     */
	public void setPicture(String picture){
		this.picture=picture;
	}
	/**
     * Set description.
     *
     * @param description  the text of description
     */
	public void setDescription(String description){
		this.description=description;
	}
	/**
     * Set weight.
     *
     * @param weight  the value of weight
     */
	public void setWeight(double weight){
		this.weight=weight;
	}
	/**
     * Set price.
     *
     * @param price  the value of price
     */
	public void setPrice(double price){
		this.price=price;
	}

	/**
     * Get productid.
     *
     * @return  the value of productid
     */
	public int getId(){
		return this.id;
	}
	/**
     * Get name
     *
     * @return  the text of name
     */
	public String getName(){
		return this.name;
	}
	/**
     * Get picture address.
     *
     * @return  the text of picture
     */
	public String getPicture(){
		return this.picture;
	}
	/**
     * Get description.
     *
     * @return  the text of description
     */
	public String getDescription(){
		return this.description;
	}
	/**
     * Get weight.
     *
     * @return  the value of weight
     */
	public double getWeight(){
		return this.weight;
	}
	/**
     * Get price.
     *
     * @return  the value of price
     */
	public double getPrice(){
		return this.price;
	}
	

}

⌨️ 快捷键说明

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