// GrapesTester.java
// Author: Kiri Wagstaff
// Date: July 8, 2001

public class GrapesTester
{
    public static void main(String args[])
    {
	// Create three bunches of grapes
	BunchOfGrapes bunch1 = new BunchOfGrapes(20);
	BunchOfGrapes bunch2 = new BunchOfGrapes(15);
	BunchOfGrapes bunch3 = new BunchOfGrapes(22);

	// Wash bunch 1
	bunch1.wash();

	// Eat a grape from bunch 1
	bunch1.eatGrape();
	// Eat a grape from bunch 3
	bunch3.eatGrape();
	
	// Was it dirty?
	if (!bunch3.isClean())
	{
	    System.out.println("Ew! You ate a dirty grape.");
	    bunch3.wash();
	}

	// Try eating a grape from bunch 4
	// Wait... we can't make this error now! 
    }
}
    
