当前位置: 首页 > 工具软件 > invoice > 使用案例 >

InvoiceItem hihihi

方弘
2023-12-01
class InvoiceItem {
    private String id;
    private String desc;
    private int qty;
    private double unitPrice;

    public InvoiceItem(String id,String desc,int qty,double unitPrice){
        this.id=id;
        this.desc=desc;
        this.qty=qty;
        this.unitPrice=unitPrice;
    }
    public String getId(){
        return id;
    }
    public String getDesc(){
        return desc;
    }
    public int getQty(){
        return qty;
    }
    public void setQty(int qty){
        this.qty=qty;
    }
    public double getUnitPrice(){
        return unitPrice;
    }
    public void setUnitPrice(double unitPrice){
        this.unitPrice=unitPrice;
    }
    public double getTotal(){
        return unitPrice*qty;
    }
    public String toString(){
        return " InvoiceItem [id =?,desc=?,qty=?,unitPrice=?]";
    }

}

 类似资料:

相关阅读

相关文章

相关问答