//define the class Monkey and make it public 
public class Monkey 
{

//Let's create some private variables.  We do not want these 
//variables being changed by any other class, so we are going to 
//declare them as private.
private String theName = new String(" ");
private int theAge;
private boolean isHungry;
	
//the default constructors for the class.  
//empty constructor for where no parameters are known in advance.
  
public Monkey ()
{
}

public Monkey (String name, int age, boolean hungry)
//full constructor with starting values passed in from another class
//be accessed by other classes
{
   theName = name;
   theAge = age;
   isHungry = hungry;
}

//we are now going to declare the METHODS attached to this class.
//These must be public or nobody else can access them!
//Get mthods first, returns values when we need to see them.
public String getName()
{
   return new String (theName);
}

public int getAge()
{
   return theAge;
}

public boolean getHungry()
{
   return isHungry;
}
//note that the first of these methods differs in syntax from the 
//other two.  This is because int and boolean are primitive data
//types in Java, but a String is another OBJECT.
 //now the SET methods - allocating values to the variables
public String setName(String name)
{
   theName = name;
   return theName;
}
	
public int setAge(int age)
{
   theAge = age;
   return theAge;
}

public boolean setHungry(boolean hungry)
{
   isHungry = hungry;
   return isHungry;
}

//finally, the special methods attached to this class.
public void eatBanana()
{
   isHungry = false;
}
//this is the method that changes the value of isHungry when
//called.  It is a VOID method because it does not return any
//values out of this class; it just changes the state of something
//internally.

//end of Monkey class
}

