/****************************************************************************
 * FullTimer subclass extends Employee superclass 
 * and overrides Employee methods
 *
 * Also getFullname() no longer needs the client to pass the salutation
 *
 ***************************************************************************/

public class FullTimer extends Employee             // extends Employee superclass
{

    private static boolean healthPlan = true;      // add static fields
    
    private int salary;                             // add instance fields
    private int vacationDays;

    /**
     * Constructors for objects of class FullTimer
     */

    FullTimer(String title, String last, String first, String x, int old,
              int sal, int vac)   
    {
        super(title, last, first, x, old);           // call superclass constructor
                                                     // pass it title,last,first,sex,age
        salary       = sal;
        vacationDays = vac;  
    }

    /**
     * override the superclass methods
     */

    public String getFullname( )                // implements getFullname()
    {
        String salutation;
        String sex = getGender( );          

        if (sex.equalsIgnoreCase(MALE))         //using the interface constants.
            salutation = "Mr.";                 //Now I no longer need the client
        else                                    //to pass me the salutation.
            salutation = "Ms.";

        return (salutation + " " + getFirstname()   + " " + getLastname());
    }

    public int getWeekPay( )                    //implements getWeekPay() 
    {
        return(salary / 52);
    } 

    public String toString ( )                              //override the toString()
    {
        String data = super.toString()  + "\n"   +          //call the superclass toString()
                      "Salary: "        + salary + "\t " +
                      "Vacation Days: " + vacationDays;
        return (data);
    }
}