HR Workflow Example
This program models HR workflow.
Problem Statement
Write a Java program to model Employee and HRWorkflow classes.
Source Code
| 1 | class Employee { |
| 2 | String name; String role; |
| 3 | Employee(String n,String r){ name=n; role=r; } |
| 4 | } |
| 5 | class HRWorkflow { |
| 6 | void process(Employee e){ System.out.println("HR processed employee: "+e.name+", Role: "+e.role); } |
| 7 | } |
| 8 | public class HRWorkflowExample { |
| 9 | public static void main(String[] args) { |
| 10 | System.out.println("Eduinq HR Workflow"); |
| 11 | Employee e=new Employee("Arun","Developer"); |
| 12 | HRWorkflow hr=new HRWorkflow(); |
| 13 | hr.process(e); |
| 14 | } |
| 15 | } |
Program Output
Eduinq HR Workflow HR processed employee: Arun, Role: Developer
Explanation
Employee models staff details. - HRWorkflow processes employee data. - This demonstrates enterprise HR workflow modeling. Conclusion: Shows HR workflow example.