📄 cartitem.java
字号:
package apusic.myshop.cart.model;import java.io.Serializable;/** * This class represents an individual line item * of the shopping cart. */public class CartItem implements Serializable { private String itemId; private String catalogId; private String name; private String style; private int quantity; private double unitCost; public CartItem(String itemId, String catalogId, String name, String style, int quantity, double unitCost) { this.itemId = itemId; this.catalogId = catalogId; this.name = name; this.style = style; this.quantity = quantity; this.unitCost = unitCost; } public String getItemId() { return itemId; } public String getCatalogId() { return catalogId; } public String getName() { return name; } public String getStyle() { return style; } public int getQuantity() { return quantity; } public double getUnitCost() { return unitCost; } public double getTotalCost() { return quantity * unitCost; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -