/**
 * Test both the FullTImer and PartTimer classes with inhereted methods
 */

public class xEmployeeTest
{
    /**
     * main method to test the classes
     */

    public static void main (String[ ] args)
    {        

        FullTimer e1 = new FullTimer("Dir","Sultan","Sam","M",48,45000,12);  
        FullTimer e2 = new FullTimer("Mgr","Smith","Mary","F",35,40000,12);  
        FullTimer e3 = new FullTimer("Asst","Stevens","Bob","M",28,35000,10);

        PartTimer e4 = new PartTimer("NE","Willis","Bill","M",45,30,25);  
        PartTimer e5 = new PartTimer("NE","Grant","Joan","F",32,25,22);  
 
        System.out.println(Employee.companyName);       //access it thru Employee
        System.out.println(FullTimer.companyName);      //or FullTimer or PartTimer
        System.out.println(PartTimer.companyName);      //(companyName is inherited)

        System.out.println(e1.getFullname());           //getFullname() method
        System.out.println(e2.getFullname());           //is inherited from 
        System.out.println(e3.getFullname());           //the Employee class
        System.out.println(e4.getFullname());           //to Fulltimer class,
        System.out.println(e5.getFullname());           //and PartTimer class

        int count;

        count = Employee.getEmployeeCount();                //You can call this method
        System.out.println("Number employees: " + count);   //on the Employee class

        count = FullTimer.getEmployeeCount();               //or you can also call it
        System.out.println("Number employees: " + count);   //on the FullTimer class
        count = PartTimer.getEmployeeCount();               //or the PartTimer class    
        System.out.println("Number employees: " + count);   //(method is inherited)
       
        /**
         * Using the toString( ) method.
         */

        System.out.println(e1 + "\n" + e2 + "\n" + e3);     //call the toString()  
        System.out.println(e4 + "\n" + e5);                 //inherited from Employee
   }
}