0% found this document useful (0 votes)
10 views

Employee Management Application (1)

Employee Management Application (1)

Uploaded by

abdelrhman2395
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Employee Management Application (1)

Employee Management Application (1)

Uploaded by

abdelrhman2395
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Employee Management

Application

By:

Abdelrhman Elsayed

Id:23120242

Mohamed Khaled

Id:23120271
Abstract:
This project implements a comprehensive staff management system
designed to handle various types of employees within an
organization. The system allows for the creation, management, and
reporting of staff members, including their payroll calculations and
departmental assignments.

Design Patterns Used:


Factory Method Pattern:

The Factory Method design pattern is employed in this project to


facilitate the creation of different types of staff members (e.g.,
HourlyEmployee, SalariedEmployee, CommissionEmployee,
ExecutiveEmployee, Volunteer) without specifying the exact class
of the object being created.

1- Encapsulation of Object Creation:


Rationale for Using the Factory Method Pattern:

By centralizing the object creation logic in a dedicated factory class


(StaffMemberFactory), we separate the instantiation of staff
member objects from the rest of the business logic. This makes the
code cleaner and easier to maintain.

2- Flexibility and Extensibility: The Factory Method allows for


easy addition of new staff member types in the future. If a new
employee type needs to be introduced, the changes can be made
within the factory method without affecting the existing codebase.

3- Improved Readability: The use of the factory pattern enhances


the readability of the code by reducing complexity in the main
application logic. Developers can easily understand how staff
members are created by looking at the factory method.

4- Decoupling: The Factory Method promotes loose coupling


between the client code and the specific classes being instantiated.
This decoupling allows for easier testing and modification of the
code.

Components:
The staff class will store the list of employees with the ability to
1: The Staff

add/edit and delete


employees. There is a count value that returns the number of
employees. Also there is a
search function to look up on any data and return the matched
users if found. A show all
function returns all users in suitable format. The callPayroll
function should return the total
amount of payment for all employees in the list.

Hourly Employee rate*hours

Salary Employee salary

Executive Employee salary+bonus

Commission 5% * target
Employee

The project class contains the following attributes: id. Location,


6: Project

currentCost, and
manager. The manager is an employee. The project is composed of
a list of budgets and we
can calculate the total budget. The print function should print
project details with a list of
all budgets.

The budget class contains the attribute value, id of budget and the
7: Budget

increaseBudget
function to increase the budget value.

The main function should follow the following minimum menu:


8: Demo

Menue:

1.Department
1. Add New Department
-> Enter department details: ..........
2. Print All Department
2. Staff
1. Add New Members
-> Enter member details: ..........
-> Enter member type: ......
-> Enter department id: ...
2. Print All Members
3. Calculate Payroll
4. Delete Member:
-> Enter member id: ......

3. Project
1. Add New Project
-> Enter project details: ..........
-> Enter manager :.....
2. Print All Projects
3. Add Budget to Existing Project
-> Project Id: ............
-> Budget Value: ........

4. Increase Budget to Existing Project


-> Project Id: ............
-> Budget Id: ........
-> Budget adds value: ….
Starter Class Diagram:

You might also like