/** Employee - A class to represent Employees
 *
 * @author - Nancy Harris and DAT NGUYEN
 * @version - V1 - 10/01/2008
 */
 
 public class Employee
 {
 	// declare the instance variables of the class
	
	protected String name; 		// the name of the worker
	protected String SSN;  		// the SSN of the worker
	protected int exemptions;	// the number of tax exemptions for this worker
	protected double wage; 		// the hourly rate for this worker
	
	protected double hours;		// the hours that this worker last worked
	protected String homeDepartment;		//home department of the worker
	
	/** default constructor...really has no meaning at this point
	 */
	public Employee(){}
	
	/** explicit value constructor
	 * 
	 * @param name 	The name of the worker
	 * @param SSN  	The SSN of the worker
	 * @param exempt	The number of payroll exemptions
	 & @param rate 	The pay rate for this employee
	 */
	public Employee(String name, String SSN, String department, int exempt, double rate)
	{
		//initializes class attributes
		this.name = name;
		this.SSN = SSN;
		this.homeDepartment = department;
		this.exemptions = exempt;
		this.wage = rate;
	} //end constructor
	
		
	/** toString produces a single line for each employee
	 *  pay is the last amount paid based on rate and hours
	 *
	 *  format is Name\tSSN\texemptions\thours\trate\tpay\n
	 *
	 * @return The line representing the employee
	 */
	 public String toString()
	 {
	 	String retString;		//String local variable
		
		//assigns the string to retString
		retString = "Name\t\tSSN\tDepartment\texemptions\thours\trate\tpay\n"
			+ this.name + "\t" + this.SSN + "\t" + this.homeDepartment + "\t" + this.exemptions 
			+ "\t" + this.hours + "\t" + this.wage + "\t" + (this.wage * this.hours);
	 	return retString;
	 } //end toString method
} //end class