/** A small program to demonstrate the parts of a Java 
 *  program
 *  
 *  @author Nancy Harris, James Madison University
 *  @version V1 - 06/2013
 */

public class CS_CTA 			// classes are the containers that hold program code and data 
{
	// class data is generally held privately
	// accessible by means of methods
	
 	private int attendees;
 	private int sessions;
	
	private final String coordinator = "Chris Mayfield";
	
	/** CS_CTA is a constructor for the CS_CTA class
	 *  @param num_attend Number of attendees
	 *  @param num_sessions Number of sessions
	 */
	public CS_CTA(int num_attend, int num_sessions) // a constructor to construct this object
	{
		attendees = num_attend;
		sessions = num_sessions;
	}
	
	/** addAttendee increments the number of attendees by 1
	 * 
	 * @return current number of attendees 
	 */
	public int addAttendee()
	{
		attendees++;
		return attendees;
	}
	
	/** subtractAttendee deccrements the number of attendees by 1
	 * 
	 * @return current number of attendees 
	 */
	public int subtractAttendee()
	{
		attendees--;
		return attendees;
	}
	
	/** addSession increments the number of sessions by 1
	 * 
	 * @return current number of sessions 
	 */
	public int addSession()
	{
		sessions++;
		return sessions;
	}
	
	/** getCoordinator returns the name of the 
	 *   coordinator for this CTA 
	 */
	public String getCoordinator()
	{
		return coordinator;
	}
	
	/** addSession decrements the number of sessions by 1
	 * 
	 * @return current number of sessions 
	 */
	public int subtractSession()
	{
		sessions--;
		return sessions;
	}
	
	/** toString returns a representation of the current state of 
	 *  this CS_CTA
	 *
	 * @return The String representation of this CS_CTA
	 */
	public String toString()
	{
		return "There are " + attendees + " attending the CS CTA " + 
			"spread over " + sessions + " sessions.";
	}
}

	 