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

📄 invoiceitem.java

📁 商品库存管理系统JAVA程序,不需要数据库.很小源程序可使用Jdk1.3以上的任何版本编译和运行
💻 JAVA
字号:
package chapter1;

public class InvoiceItem extends Item {
	//定义提货清单中每个条目的价格
	protected double total;

	//提货条目的构造函数,以相关的存货条目和提货数量为参数
	public InvoiceItem(InventoryItem item, int _units) {
		super(item.ID);
		desc = item.desc;
		price = item.price;
		units = _units;
		total = price * units;
	}

	//以字符串的形式返回提货清单中的一条提货条目
	public String toString() {
		return super.toString() + " = " + Util.dollar(total) + "\t(" + desc
				+ ")";
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -