/**
 * Employee superclass 
 *
 */

public class Employee
{
    /**
     * class and instance variables
     */

    static String companyName  = "XYZ inc.";            //class fields
    static int    employeeCount;
    
    String position;                                    //instance fields
    String lastname;
    String firstname;
    String sex;
    int    age;

    /**
     * Constructors for objects of class Employee
     */

    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
                                                     //and pass it title
        lastname  = last;
        firstname = first;  
        sex       = x;
        age       = old;
    }

    /**
     * class and instance methods
     */

    static int getEmployeeCount( )                      //class method
    {
        return (employeeCount);
    }

    String getFullname ()                               //instance method
    {
        String salutation = (sex.equals("M")) ? "Mr." : "Ms.";

        String fullname   = salutation +" "+ firstname +" "+ lastname;
        return (fullname);
    }
}