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

📄 cartitem.java

📁 bs_网上购物系统每个例子文件夹都附有数据库表、程序源文件和一个war包(或者jar包)。如果是cs结构的
💻 JAVA
字号:
package bo;

import vo.*;

public class CartItem {
    private Products product;
    private Integer quantity;
    private Double itemPrice;

    public void setProduct(Products product) {
        this.product = product;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public void setItemPrice(Double itemPrice) {
        this.itemPrice = itemPrice;
    }

    public Products getProduct() {
        return product;
    }

    public Integer getQuantity() {
        return quantity;
    }
    /**
     * 小计金额
     * @return Double
     */
    public Double getItemPrice() {
        double price = this.getProduct().getPrice().doubleValue() *
                       this.getQuantity().intValue();
                return new Double(price);
    }
}

⌨️ 快捷键说明

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