/**
 * Employee superclass 
 * Since it has abstract methods, it must be declared as an abstract class
 *
 */

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

    private static String companyName  = "XYZ inc.";     //class fields
    private static int    employeeCount;
    
    private String position;                             //instance fields
    private String lastname;
    private String firstname;
    private String sex;
    private 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
     */

    public String getFirstname( )        
    {
        return (firstname);
    }
    public String getLastname( )        
    {
        return (lastname);
    }
    public String getGender( )                           
    {
        return (sex);
    }
    public int getAge( )                           
    {
        return (age);
    }

    public abstract String getFullname( );                 //abstract methods, must be
    public abstract int getWeekPay( );                     //overridden in subclasses 

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