1 Star 0 Fork 0

Balder/购物车

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ProductItem.java 684 Bytes
一键复制 编辑 原始数据 按行查看 历史
Balder 提交于 2020-12-25 12:28 +08:00 . 购物车
package ShoppingCart;//商品清单
public class ProductItem {
private Product product;// 购买的商品
private int count;// 商品数量
public ProductItem() {
}
public ProductItem(Product product) {
this.product = product;
}
public ProductItem(Product product, int count) {
this.product = product;
this.count = count;
}
public Product getProduct() {
return product;
}
public void setProduct(Product product) {
this.product = product;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public double totalMoney() {// 小计
double price = product.getPrice();// 获取商品单价
return price * count;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangyanyuvc/shopping-cart.git
git@gitee.com:wangyanyuvc/shopping-cart.git
wangyanyuvc
shopping-cart
购物车
master

搜索帮助