package retail;

public class Item
{
	private String barcode;
	private String description;
	private int price;
	private boolean taxable;
	
	public Item(String barcode)
	{
		this.setBarcode(barcode);
	}

	public String getBarcode()
	{
		return barcode;
	}

	public void setBarcode(String barcode)
	{
		this.barcode = barcode;
	}

	public String getDescription()
	{
		return description;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price)
	{
		this.price = price;
	}

	public boolean isTaxable()
	{
		return taxable;
	}

	public void setTaxable(boolean taxable)
	{
		this.taxable = taxable;
	}
	
	/**Returns price string for this item's price, formatted with RetailHelper.getCashString()*/
	public String getPriceString()
	{
		return RetailHelper.getCashString(price);
	}
	
	//TODO better toString representation
	public String toString()
	{
		return barcode + ", " + description + ", $" + RetailHelper.getCashString(price) + (taxable ? ", taxable" : ", not taxable"); 
	}

}

@@ -203,24 +203,232 @@
 rcode);%0D%0A%09%7D%0D
+%0A%09%0D%0A%09public Item(Item newItem) %7B%0D%0A%09%09this.setBarcode(newItem.getBarcode());%0D%0A%09%09this.setDescription(newItem.getDescription());%0D%0A%09%09this.setPrice(newItem.getPrice());%0D%0A%09%09this.setTaxable(newItem.isTaxable());%0D%0A%09%7D%0D
 %0A%0D%0A%09public S

Add constructor for duplicating supplied item