public class Smiley {
    //class variables
    public static final char HAPPY = ')';
    public static final char SURPRISE = 'O';
    public static int count = 0;
    //instance variables
    private char eyes;
    private char nose;
    private char mouth;
    /*
    * Please create a constructor to allow 
    *the caller to set the eyes, nose
    * and mouth when creating a Smiley.
    */
    public Smiley(char myEyes, char myNose, char myMouth)
    {
    	count++;
    	eyes = myEyes;
    	nose = myNose;
    	mouth = myMouth;
    }
    
    /**
    * create a constructor that makes 
    * a default happy Smiley.
    */
    public Smiley()
    {
    	//eyes = ':';
    	//nose = '-';
    	//mouth = ')';
    	this(':', '-', ')');	
    }
        
    //get count value
    public static int getCount()
    {
    	return count; 	
    }    
    // create accessor and mutator methods
    public char getEyes()
    { return eyes;
    }
    
    public char getNose()
    { return nose;
    }
    
    public char getMouth()
    { return mouth;
    }
    
    public void setEyes(char newEyes)
    {
    	eyes = newEyes;
    }
    
    public void setNose(char newNose)
    {
    	nose = newNose;
    }
    
    public void setMouth(char newMouth)
    {
    	mouth = newMouth;
    }
   
   
    /**
    * The toString() method puts the eyes, nose, and mouth together
    * to form a String representation of a Smiley.
    * @return The String representation of a Smiley
    */
    public String toString() 
    {
        String smiley = String.valueOf(eyes)+
               String.valueOf(nose)+String.valueOf(mouth);
        return(smiley);
    }
    
    /**
    * The equals() method determines if two Smileys have the same
    * eyes, nose, and mouth characters.
    * @return Boolean (true or false)
    */
    public boolean equals(Object obj) 
    {
        if (!(obj instanceof Smiley))
            return false;
        Smiley s = (Smiley)obj;
        return (s.getEyes() == eyes &&
                s.getNose() == nose &&
                s.getMouth() == mouth);
    }
}
