?? commodityorder.java
字號:
package NetCommodityOrder.ejbtools;
import java.io.Serializable;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//這是一個輔助的類文件,用于建立商品訂購的類對象。
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class CommodityOrder implements Serializable
{
String commodityname = null;
String orderid = null;
String commodityid = null;
int unitprice = -1;
int quantity = -1;
int totalprice = -1;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//建立兩個包含不同參數的CommodityOrder對象構造器
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public CommodityOrder(String orderid,String commodityid,int quantity)
{
this.orderid = orderid;
this.commodityid = commodityid;
this.quantity = quantity;
}
public CommodityOrder(String orderid,String commodityid,int quantity,String commodityname,int unitprice,int totalprice)
{
this.orderid = orderid;
this.commodityid = commodityid;
this.quantity = quantity;
this.commodityname = commodityname;
this.unitprice = unitprice;
this.totalprice = totalprice;
}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//定義一些屬性方法
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public String getOrderid()
{
return orderid;
}
public String getCommodityid()
{
return commodityid;
}
public int getQuantity()
{
return quantity;
}
public String getCommodityname()
{
return commodityname;
}
public int getUnitprice()
{
return unitprice;
}
public int getTotalprice()
{
return totalprice;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -