invoice.java

来自「一个简单的网上订书系统 java的课程设计」· Java 代码 · 共 74 行

JAVA
74
字号
package beans;

public class Invoice {

	private String Ono;

	private String BID;

	private int qty;

	private float billedPrice;

	public Invoice() {
		Ono = null;
		BID = null;
		qty = 0;
		billedPrice = 0.0f;
	}

	public Invoice(String[] args) {
		if (args.length != 4)
			return;
		Ono = args[0];
		BID = args[1];
		qty = Integer.parseInt(args[2]);
		billedPrice = Float.parseFloat(args[3]);
	}

	public Invoice(String Ono, String BID, int qty, float billedPrice) {
		this.Ono = Ono;
		this.BID = BID;
		this.qty = qty;
		this.billedPrice = billedPrice;
	}

	public String getOno() {
		return Ono;
	}

	public void setOno(String Ono) {
		this.Ono = Ono;
	}

	public String getBID() {
		return BID;
	}

	public void setBID(String BID) {
		this.BID = BID;
	}

	public int getQty() {
		return qty;
	}

	public void set(int qty) {
		this.qty = qty;
	}

	public float getBilledPrice() {
		return billedPrice;
	}

	public void setBilledPrice(float billedPrice) {
		this.billedPrice = billedPrice;
	}

	public String toString() {
		return getOno() + "  " + getBID() + "  " + getQty() + "  "
				+ getBilledPrice();
	}

}

⌨️ 快捷键说明

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