public class OldMacDonald
{
	public void hadAFarm(Cow moo, Cow moomoo)
		throws EIEIOException
	{
		if (!moo.here() && !moo.there() && !moomoo.everywhere())
		{
			throw new EIEIOException("Trouble on the farm!");
		}
	}
	
	public static void main(String args[])
	{
		// Need some cows that fail.
		Cow cow1 = new Cow(false, false, false);
		Cow cow2 = new Cow(false, false, false);
		OldMacDonald farmer = new OldMacDonald();
		try
		{
			farmer.hadAFarm(cow1, cow2);
		}
		catch (EIEIOException ex)
		{
			System.out.println(ex);
			ex.printStackTrace();
			System.out.println("Better get some pigs.");
		}
	}
}
	
// Need a class with those method names!
class Cow
{
	private boolean here;
	private boolean there;
	private boolean everywhere;
	public Cow(boolean here, boolean there, boolean everywhere)
	{
		this.here = here;
		this.there = there;
		this.everywhere = everywhere;
	}
	
	public boolean here()
	{
		return here;
	}
	
	public boolean there()
	{
		return there;
	}
	
	public boolean everywhere()
	{
		return everywhere;
	}
}
