/**************************************************************************
 * The Employee class
 * From previous example
 *************************************************************************/
public class Employee
{
    private static String companyName  = "XYZ inc.";     // class variables
    private static int    employeeCount;
    
    private String position;                             // instance variables
    private String lastname;
    private String firstname;
    private String sex;
    private int    age;

    Employee(String title)                            // first constructor
    {
        position       = title;
        employeeCount += 1;         
    }

    Employee(String title, String last, String first, String x, int old)   
    {
        this(title);                                 // call first constructor
                                                     // add pass it title
        lastname  = last;
        firstname = first;  
        sex       = x;
        age       = old;
    }

    Employee(Employee obj)                           // copy constructor    
    {
        this(obj.position, obj.lastname, obj.firstname, obj.sex, obj.age);
    }


    void  setLastname(String lastname)         
    {
        this.lastname = lastname;
    }

    public String toString ( )                      
    {
        String data = "Position: " + position + 
                      "\t Name: "  + firstname +  " " + lastname + 
                      "\t Sex: "   + sex + "\t Age: " + age;
        return (data);
    }
}