/**
 * Test an abstract class as follows:
 *    Employee is an abstract class with 2 abstract methods 
 *    FullTImer and PartTimer classes extend Employee, and override the 2 abstract methods
 *
 */

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

    public static void main (String[ ] args)
    {        
    /**
     * All employees will be created using variables type Employee,
     * but the objects created will be either FullTimer or PartTimer
     */ 

        Employee[ ] emp = new Employee[10];     //Create an array of Employees

        emp[0] = new FullTimer("Dir","Sultan","Sam","M",48,78000,12);      
        emp[1] = new FullTimer("Mgr","Smith","Mary","F",35,62400,12);   
        emp[2] = new FullTimer("Sec","Stevens","Bob","M",28,44200,10);

        emp[3] = new PartTimer("NE","William","Bill","M",45,30,25);  
        emp[4] = new PartTimer("NE","Johnson","Joan","F",32,25,22);  
 
        System.out.println(emp[0].getWeekPay() +"\t"+ emp[0].getFullname());                                                         
        System.out.println(emp[1].getWeekPay() +"\t"+ emp[1].getFullname());                                  
        System.out.println(emp[2].getWeekPay() +"\t"+ emp[2].getFullname());                                                         
        System.out.println(emp[3].getWeekPay() +"\t"+ emp[3].getFullname());                                      
        System.out.println(emp[4].getWeekPay() +"\t"+ emp[4].getFullname());              

        System.out.println("\n ---Better yet, Using a Loop ---");

        for (int i = 0; i < 5; i++)
            System.out.println(emp[i].getWeekPay() +"\t"+ emp[i].getFullname());  
    }
}