Skip to content

YuriiJavaDev/JavaBasics_Task_318_V0.1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scalable HR System: Seamless Integration (JavaBasics_Task_318_V0.1)

📖 Description

The true test of a software architecture is its response to change. This project demonstrates the Scalability of Polymorphism. By adding a Tester role to our existing Employee hierarchy, we show that the system's core logic—the team iteration loop—requires zero modifications to handle new types of employees. This follows the Open/Closed Principle: the system is open for extension (adding new roles) but closed for modification (the processing logic remains stable).

📋 Requirements Compliance

  • Hierarchy Expansion: Integrated a new Tester class into the established Employee structure.
  • Method Overriding: Specialized the work() method to reflect quality assurance activities.
  • Dynamic Integration: Successfully added the new object type to a polymorphic array.
  • Logic Invariance: Verified that the same loop processes all roles (Manager, Developer, Tester) correctly.

🚀 Architectural Stack

  • Java 8+ (Polymorphism, Inheritance, Array Initialization)

🏗️ Implementation Details

  • Employee: The base abstraction.
  • Tester: The newly added role focused on bug hunting.
  • HRSystemEvolutionLauncher: The updated entry point managing the expanded team.

📋 Expected result

Manager is holding a meeting
Developer is writing code.
Tester is searching for bugs.

💻 Code Example

Project Structure:

JavaBasics_Task_318/
├── src/
│   └── com/yurii/pavlenko/
│                 ├── app/
│                 │   └── HRSystemEvolutionLauncher.java
│                 └── hr/
│                     ├── roles/
│                     │   ├── Manager.java
│                     │   ├── Developer.java
│                     │   └── Tester.java
│                     └── Employee.java
├── LICENSE
├── TASK.md
├── THEORY.md
└── README.md

Code

package com.yurii.pavlenko.app;

import com.yurii.pavlenko.hr.Employee;
import com.yurii.pavlenko.hr.roles.Manager;
import com.yurii.pavlenko.hr.roles.Developer;
import com.yurii.pavlenko.hr.roles.Tester;

public class HRSystemEvolutionLauncher {

    public static void main(String[] args) {

        Employee[] team = {
                new Manager(),
                new Developer(),
                new Tester()
        };

        for (Employee employee : team) {
            employee.work();
        }
    }
}
package com.yurii.pavlenko.hr;

public class Employee {
    public void work() {
        System.out.println("The employee is working...");
    }
}
package com.yurii.pavlenko.hr.roles;

import com.yurii.pavlenko.hr.Employee;

public class Manager extends Employee {
    @Override
    public void work() {
        System.out.println("Manager is holding a meeting");
    }
}
package com.yurii.pavlenko.hr.roles;

import com.yurii.pavlenko.hr.Employee;

public class Developer extends Employee {
    @Override
    public void work() {
        System.out.println("Developer is writing code.");
    }
}
package com.yurii.pavlenko.hr.roles;

import com.yurii.pavlenko.hr.Employee;

public class Tester extends Employee {
    @Override
    public void work() {
        System.out.println("Tester is searching for bugs.");
    }
}

⚖️ License

This project is licensed under the MIT License.

Copyright (c) 2026 Yurii Pavlenko

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...

License: MIT

About

This is a tutorial project. JavaBasics_Task_318_V0.1 Scalable HR System: demonstrating how polymorphism allows the seamless addition of new roles (Tester) to an existing team processing logic without modifying the core execution loop. 150426_0841

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages