⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saleslineitem.java

📁 网上购物系统,实现了一个具体的框架
💻 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 + -