package currency;

/** Base class to specify a single item of currency, such as
 *  a ten-dollar note or a dime
 *  Each item of currency has a name and an amount
 * @author walker
 *
 */
public class CurrencyItem {
	
	private String name;
	private int amount;
	
	public CurrencyItem (String label, int value)
	{
		name = label;
		amount = value;
	}

	/** the currency name and amount can be retrieved,
	 *  but neither the name nor the amount can be changed
	 */
	public String getName() {
		return name;
	}

	/** the face value of the currency (in cents), such as 10 for a dime
	 */
	public int getAmount() {
		return amount;
	}
	
	/** the public name/amount for this currency item
	 */
	public String toString() {
		return (name + " (" + amount + ")" );
	}
}
