package candy;

/**
 * A machine that dispenses candy.  Newly created candy machines must
 * always have at least one piece of candy.
 *
 * @author Samuel A. Rebelsky
 * @version 1.1 of September 2006
 */
public interface CandyMachine
{
	/**
	 * Get a piece of candy.
	 *
	 * @exception CandyMachineException
	 *   If unable to return a piece of candy (e.g., if empty).
	 */
	public String get()
		throws CandyMachineException;

	/**
	 * Determine if the machine is empty.
	 */
	public boolean isEmpty();
} // interface CandyMachine

