Employer Management Project in C++ | Projects in C++ compiler.

Employer Management Project in C++ | Projects in C++ compiler.


Employer Management :

Some Times we need a program or software which can perform our tasks in different fields. The employer management project in C++ is related to that task actually.

C++ Project:

In this Employer Management Project, we will use different kinds of arrays and also used the if and else statement to perform the task related to the specific parts.

Tasks In C++ Project:

In this Employer management system we will use the following task :
  • Display the lists of the Employers who will get a high bonus in the week.
  • Display the lists of the Employers who will get the lowest bonus in the week.
  • Display the list of the Employer who will not spend even the 30 hours in the office.
  • Lists of Employers who do not get the bonus in the week.
  • Sort the list of Employers according to their bonus.
  • Display the Employers of the week.
  • Search the Employers with the code id.
We will perform the whole tasks by using C++ Compiler.

Employer-Management-Project-in-C++-Projects-in-C++-compiler.
Employer-Management-Project-in-C++-Projects-in-C++-compiler.


C++ Code of Employer Management:

/*
#include<iostream>
using namespace std;
int main()
{
int p = 0;
do{
system("cls");
const int size = 5;
int code_id[size] = { 0 }, current_salary[size] = { 0 }, year[size] = { 0 }, leave_availed[size] = { 0 }, Extra_hours[size] = { 0 };
char gender[size] = { '\0' };
cout << "*******************************************" << endl;
cout << "HISTORY OF EMPLOYES" << endl;
cout << "please enter the 5 employers atleast" << endl;
cout << "*******************************************" << endl;
for (int i = 0; i < size; i++)
{
cout << "Enter code id :";
cin >> code_id[i];
cout << "Enter current salary :";
cin >> current_salary[i];
cout << "Enter year :";
cin >> year[i];
cout << "Enter leave availed :";
cin >> leave_availed[i];
cout << "Enter Extra hours :";
cin >> Extra_hours[i];
cout << "Enter gender :";
cin >> gender;
cout << endl;
cout << endl;
}
int choice = 0;
int calculated_bonus[size] = { 0 };
int cur_salary = 0;
int calc_bonus = 0;
int per_hour_coast = 0;

//calculated bonus
for (int i = 0; i < size; i++)
{
cur_salary = current_salary[i];
per_hour_coast = cur_salary*0.035;
if (Extra_hours[i] >= 8)
{
calc_bonus = 8 * per_hour_coast;
}
else if (Extra_hours[i] <= 8)
{
calc_bonus = Extra_hours[i] * per_hour_coast;
}
else
{
cout << "Invalid output";
}
calculated_bonus[i] = calc_bonus;
cur_salary = 0;
calc_bonus = 0;
per_hour_coast = 0;

}
cout << "****************************************************************************************************" << endl;
cout << "Enter Choices" << endl;
cout << "1. Display the employee details who has got the highest bonus for the week." << endl;
cout << "2. Display the employee details who has got the lowest bonus for the week." << endl;
cout << "3. Display the details of the employees who has not successfully spent minimum of 30 hours"<<endl<<" in office. (If so deduct their salaries by 5% of their total salaries)." << endl;
cout << "4. Display all the employees who got bonuses by spending extra hours in office. The employees"<<endl<<" who did not meet 30 hours requirement should not be displayed here." << endl;
cout << "5. Sort and display the data of employees on the basis of extra hours worked in ascending order." << endl;
cout << "6. Provide a certificate (Display message) to the employees who has availed the minimum leaves or"<<endl<<" who spent the maximum extra hoursthe certificate of “Employee of the week” along with his all details." << endl;
cout << "7. Search an employee by his code id and display his details on screen." << endl;
cout << "******************************************************************************************************" << endl;
cin >> choice;
if (choice == 1)
{
int max_id = 0;
int max_bonus = 0;
cout << "***********************************************************" << endl;
cout << "The detail of emplye with achieve highest bonus" << endl;
for (int i = 0; i < size; i++)
{
if (Extra_hours[i] >= max_bonus)
max_bonus = Extra_hours[i];
max_id = code_id[i];
for (int i = 0; i < 1; i++)
{
cout << "Employe Number" << i + 1 << endl;
cout << "Code id of emplye : " << code_id[i] << endl;
cout << "Year of joining is : " << year[i] << endl;
cout << "Gender of employe : " << gender << endl;
cout << "Current salary of employe:" << current_salary[i] << endl;
cout << "Leave availed of employe:" << leave_availed[i] << endl;
cout << "Extra hours of employe:" << Extra_hours[i] << endl;
cout << "****************************************************" << endl;
}
}
}
if (choice == 2)
{
int min_id = 1000;
int min_bonus = 0;
for (int i = 0; i < size; i++)
{
if (Extra_hours[i] <= min_id)
{
min_id = Extra_hours[i];
min_bonus = code_id[i];
for (int i = 0; i < 1; i++)
{
cout << "****************************************************" << endl;
cout << "Employe Number" << i + 1 << endl;
cout << "Code id of emplye : " << code_id[i] << endl;
cout << "Year of joining is : " << year[i] << endl;
cout << "Gender of employe : " << gender << endl;
cout << "Current salary of employe:" << current_salary[i] << endl;
cout << "Leave availed of employe:" << leave_availed[i] << endl;
cout << "Extra hours of employe:" << Extra_hours[i] << endl;
cout << "****************************************************" << endl;

}
}
}
}
else if (choice == 3)
{
int deduct_salary = 0;
for (int i = 0; i < size; i++)
{
if (leave_availed[i]>0)
deduct_salary = current_salary[i] * 0.05;
deduct_salary = current_salary[i] - deduct_salary;
cout << "****************************************************" << endl;
cout << "Deduct salary : " << deduct_salary << endl;
cout << "Code id of emplye : " << code_id[i] << endl;
cout << "Year of joining is : " << year[i] << endl;
cout << "Gender of employe : " << gender << endl;
cout << "****************************************************" << endl;
}
deduct_salary = 0;
}
else if (choice == 4)
{
for (int i = 0; i < size; i++)
{
if (Extra_hours[i] >0)
cout << "****************************************************************************" << endl;
cout << "Code id of emplye to spending extra hours in office : " << code_id[i] << endl;
} cout << "****************************************************************************" << endl;
}
if (choice == 6)
{
int x = 0;
cout << "****************************************************************************" << endl;
cout << "Enter the code_id of the employe you want the certificates off : ";
cin >> x;
cout << endl;
cout << "\t" << "CERTIFICATES OF EMPLOYE" << endl;
cout << "\t" << "To whom it may concern " << endl;
for (int i = x; i < size; i++)
{
i = i - 1;
cout << "\t" << "This is to inform that Id :" << code_id[i] << "has been employed with me doing his job since " << year[i] << endl;
cout << endl;
cout << "\t" << "THANks" << endl;
cout << endl;
i = x;
cout << "****************************************************************************" << endl;

}
}
if (choice == 7)
{
int y = 0;
cout << "****************************************************************************" << endl;
cout << "Enter code id to display his detail on screen " << endl;
cin >> y;
for (int i = y; i < 3; i++)
{
if (y == i)
{
i = i - 1;
cout << "Employe Number" << i + 1 << endl;
cout << "Code id of emplye : " << code_id[i] << endl;
cout << "Year of joining is : " << year[i] << endl;
cout << "Gender of employe : " << gender << endl;
cout << "Current salary of employe:" << current_salary[i] << endl;
cout << "Leave availed of employe:" << leave_availed[i] << endl;
cout << "Extra hours of employe:" << Extra_hours[i] << endl;
i = y;
cout << "****************************************************************************" << endl;
}
}
}
cout << endl;
cout << "******************************************" << endl;
cout << "If you want to exit program enter -1: ";
cin >> p;
cout << "******************************************" << endl;
} while (p != -1);
system("Pause");
return 0;
}
*/

Employer Management-Project-in-C++--Projects-in-C++-compiler
Employer Management-Project-in-C++--Projects-in-C++-compiler


Conclusion:

After Completing this Project will be able to perform many tasks using this program. We can get the full details of even a single employer with all the details.


[So this is the simple and basic C++ project of Employment Management. If you have any suggestions related to this Project Then Please let me Know in the common Box and special thanks to Ahtasham-Ul-Haq.]
                                                                         
Thanks With The Best Regards,
Bilal Ahmad

3 comments:

Please tell me if you have any suggestions related to these projects.
thanks

Powered by Blogger.