HRSystem_5/src/Organization/PayrollTransaction.java
// return object of specified Transaction subclass
return object of specified Transaction subclass
return object of specified Transaction subclass
private Transaction createTransaction( int type )
   {
      CompanyDatabase companyDatabase = getCompanyDatabase();
      Transaction temp1 = null; 
      switch ( type )
      {
         case EMPLOYEE_EARNINGS: 
            companyDatabase.displayAllEmployeeEarnings();
            break;
         case SORT_SALARY: 
            companyDatabase.sortEmployeeSalary();
            break; 
         case SORT_NAME: 
            companyDatabase.sortEmployeeName();
            break; 
      } 
      return temp1; 
   }
private Transaction createTransaction ( int type ) { CompanyDatabase companyDatabase = getCompanyDatabase ( ) ; Transaction temp1 = null ; switch ( type ) { case EMPLOYEE_EARNINGS : companyDatabase . displayAllEmployeeEarnings ( ) ; break ; case SORT_SALARY : companyDatabase . sortEmployeeSalary ( ) ; break ; case SORT_NAME : companyDatabase . sortEmployeeName ( ) ; break ; } return temp1 ; }
return object of specified Transaction subclass
return object of specified Transaction subclass
// temporary Transaction variable // determine which type of Transaction to create      // create new EmployeeInquiry transaction // create new Withdrawal transaction // create new Withdrawal transaction // end switch // return the newly created object