HRSystem_5/src/Organization/HRSystemTest.java
// main method creates and runs the HRSystem
main method creates and runs the HRSystem
main method creates and runs the HRSystem
public static void main( String[] args )
   {
      HRSystem theHRSystem = new HRSystem();    
      theHRSystem.run();
     /*
    // Instantiating the TestEngineer1
    System.out.println("Enter the TestEngineer1 name:");
    String name3 = input.next();
    System.out.println("Enter TestEngineer1 ID:");
    int id3 = input.nextInt();
    System.out.println("Enter TestEngineer1 Salary:");   
    double salary3 = input.nextDouble();
    System.out.println("Enter TestEngineer1 speciality");
    String speciality1 = input.next();
    TestEngineer te1 = new TestEngineer(name3, hiretesteng1 , id3, salary3, speciality1);
    te1.setHireDate(hiretesteng1);
    System.out.println( te1 );
    // Instantiating the TestEngineer2
    System.out.println("Enter the TestEngineer2 name:");
    String name4 = input.next();
    System.out.println("Enter TestEngineer2 ID:");
    int id4 = input.nextInt();
    System.out.println("Enter TestEngineer2 Salary:");   
    double salary4 = input.nextDouble();
    System.out.println("Enter TestEngineer2 speciality");
    String speciality2 = input.next();
    TestEngineer te2 = new TestEngineer(name4, hiretesteng2 , id4, salary4 ,speciality2);
    te1.setHireDate(hiretesteng2);
    System.out.println( te2 );
    // Instantiating the DesignEngineer
    System.out.println("Enter the DesignEngineer name:");
    String name5 = input.next();
    System.out.println("Enter DesignEngineer ID:");
    int id5 = input.nextInt();
    System.out.println("Enter DesignEngineer Salary:");   
    double salary5 = input.nextDouble();
    System.out.println("Enter DesignEngineer speciality");
    String speciality3 = input.next();
    DesignEngineer de1 = new DesignEngineer(name5, hiredesigneng1, id5, salary5 ,speciality3);
    de1.setHireDate(hiredesigneng1);
    System.out.println( de1 );
    // Instantiating the Company object
    System.out.println( "\nNew Company Object:" ); 
    CompanyDatabase company1 = new CompanyDatabase();
    System.out.println( company1 ); 
    company1.hire(m1);
    company1.hire(admin1);
    company1.hire(eng1);  
    company1.hire(te1);
    company1.hire(te2);
    company1.hire(de1);
    company1.getAllEmployeeDetails();
   // company1.displayAllEmployeeEarnings();
   // company1.sortEmployeeSalary();
    //company1.sortEmployeeName();
    // Check for employee in arrayList   
    System.out.println("Enter emloyee name you want to search:");
    String emp  = input.next();
    if (company1.searchForEmployee(m1) == true) {
    System.out.println( "\nEmployee you were looking for is contained in the list" + emp);
    }
    else 
    {
        System.out.println(emp +" is not contained in the list"); 
    }
      */
   }
public static void main ( String [ ] args ) { HRSystem theHRSystem = new HRSystem ( ) ; theHRSystem . run ( ) ; /*
    // Instantiating the TestEngineer1
    System.out.println("Enter the TestEngineer1 name:");
    String name3 = input.next();
    
    System.out.println("Enter TestEngineer1 ID:");
    int id3 = input.nextInt();
    
    System.out.println("Enter TestEngineer1 Salary:");   
    double salary3 = input.nextDouble();
    
    System.out.println("Enter TestEngineer1 speciality");
    String speciality1 = input.next();
    
    TestEngineer te1 = new TestEngineer(name3, hiretesteng1 , id3, salary3, speciality1);
    te1.setHireDate(hiretesteng1);
    System.out.println( te1 );
     
    // Instantiating the TestEngineer2
    System.out.println("Enter the TestEngineer2 name:");
    String name4 = input.next();
    
    System.out.println("Enter TestEngineer2 ID:");
    int id4 = input.nextInt();
    
    System.out.println("Enter TestEngineer2 Salary:");   
    double salary4 = input.nextDouble();
    
    System.out.println("Enter TestEngineer2 speciality");
    String speciality2 = input.next();
    
    TestEngineer te2 = new TestEngineer(name4, hiretesteng2 , id4, salary4 ,speciality2);
    te1.setHireDate(hiretesteng2);
    System.out.println( te2 );
     
    // Instantiating the DesignEngineer
    System.out.println("Enter the DesignEngineer name:");
    String name5 = input.next();
    
    System.out.println("Enter DesignEngineer ID:");
    int id5 = input.nextInt();
    
    System.out.println("Enter DesignEngineer Salary:");   
    double salary5 = input.nextDouble();
    
    System.out.println("Enter DesignEngineer speciality");
    String speciality3 = input.next();
    
    DesignEngineer de1 = new DesignEngineer(name5, hiredesigneng1, id5, salary5 ,speciality3);
    de1.setHireDate(hiredesigneng1);
    System.out.println( de1 );
    
    
    // Instantiating the Company object
    System.out.println( "\nNew Company Object:" ); 
    CompanyDatabase company1 = new CompanyDatabase();
    System.out.println( company1 ); 
    company1.hire(m1);
    company1.hire(admin1);
    company1.hire(eng1);  
    company1.hire(te1);
    company1.hire(te2);
    company1.hire(de1);
    company1.getAllEmployeeDetails();
   // company1.displayAllEmployeeEarnings();
   // company1.sortEmployeeSalary();
    //company1.sortEmployeeName();
 
    // Check for employee in arrayList   
    System.out.println("Enter emloyee name you want to search:");
    String emp  = input.next();
    if (company1.searchForEmployee(m1) == true) {
    System.out.println( "\nEmployee you were looking for is contained in the list" + emp);
    }
    else 
    {
        System.out.println(emp +" is not contained in the list"); 
    }
      */ }
main method creates and runs the HRSystem
main method creates and runs the HRSystem
// creating Date objects for each employee // Date hiree1 = new Date( 3, 12, 1988 ); //  Date hiree2 = new Date( 1, 2, 1998 ); //  Date hiree3 = new Date( 3, 12, 1994 );3 //  Date hiree4 = new Date( 3, 12, 1992 ); // Date hiremanager1 = new Date (5, 8, 1989); //    Date hireadmin1 = new Date (7, 3, 1988); // Date hireeng1 = new Date (9, 3, 1994); //Date hiretesteng1 = new Date (5, 8, 1997);  //Date hiretesteng2 = new Date (1, 5, 1992);  //Date hiredesigneng1 = new Date(5, 4, 1995); // Instantiating the Employees // We use abstract class Employee to hold instances of its subclasses //  Employee e1 = new Manager( "Bob Blue", hiree1, 90000, 450) {}; //e1.calcEarnings(); // Employee e2 = new Administrator( "John Red", hiree2, 70000, 6, 300, 60.00 ) {}; //  Employee e3 = new Engineer ( "Tim Old", hiree3, 3000, "Software Engineer" ) {};      //  Employee e4 = new Engineer( "Jack Wiley", hiree4, 3000, "Electrical Engineer" ) {};