?? cartitem.java
字號(hào):
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;
}
/**
* 小計(jì)金額
* @return Double
*/
public Double getItemPrice() {
double price = this.getProduct().getPrice().doubleValue() *
this.getQuantity().intValue();
return new Double(price);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -