?? saleslineitem.java
字號:
/**
* @name SalesLineItem.class
* @version 1.0
* @author Administrator/pan
* @date 2009/2/11
*/
package com.digitstore.process;
public class SalesLineItem {
//商品
private ProductSpecification prodSpec;
//數量
private int quantity;
//構造函數
public SalesLineItem(ProductSpecification procSpec, int quantity){
this.prodSpec = procSpec;
this.quantity = quantity;
}
//相應的get/set方法
public ProductSpecification getprodSpec(){
return prodSpec;
}
public void setprodSpec(Item item){
this.prodSpec = prodSpec;
}
public int getQuantity(){
return quantity;
}
public void setQuantity(int quantity){
this.quantity = quantity;
}
//獲取本條目的總價
public double getSubTotal(){
return prodSpec.getPrice()*quantity;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -