尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
………………………………………………
………………………………………….
Project Report
On
SALARY MANAGEMENT
SYSTEM
…………………
………………….
ACKNOWLEDGEMENT
I would like to convey my heartful thanks to
……………….. (Computer Science) who always gave
valuable suggestions & guidance for completion of my
project.
He helped me to understand & remember important
details of the project. My project has been a success
only because of his guidance.
I am especially indented & I am also beholden to my
friends. And finally I thank to the members of my
family for their support & encouragement.
CERTIFICATE
This is to certify that ……………………of
………… of …………………………………
has completed his project under my supervision.
He has taken proper care & shown sincerity in
completion of this project.
I certify that this project is up to my
expectation & as per the guideline issued by
CBSE.
……………………………….
(Computer Science faculty )
Content
1. Introduction
2. Source Code
3. Output
4. Requirement
5. Advantages and disadvantages
6. Conclusion
7. System design
This project SALARY MANAGEMENT SYSTEM includes some facilities
of managing the salary of the employees. It also save the
records of employee’s details and administrator can search,
display, modification, delete etc. This software searches the
employee data which is store in the record and after that print
the salary report of the employee.
The software used for small company to maintain their records
related to employees and salary.
//***************************************************************
// HEADER FILE USED IN PROJECT
//****************************************************************
#include<conio.h>
#include<stdio.h>
#include<process.h>
#include<fstream.h>
#include<iomanip.h>
#include<string.h>
#include<ctype.h>
void middleadminmenu();
void printreportsalary(int empno);
void intromain();
int getsalary();
int getemployees();
void display_all();
void display_all_emp();
void salary_tabular();
void modify_recordsalary(int n);
void delete_recordsalary(int n);
void againopenandclose();
void againopenandclosecust();
int search(int p);
//void changeqty(int pr1,int q11);
//***************************************************************
// CLASS USED IN PROJECT
//****************************************************************
//*******************information****************************
class employee
{
int emp_id;
char ename[25];
char address[35];
char phno[15];
char desg[35];
public:
void modifycust_data(int n1,char nm[15],char add[15],char q[15]);
void showempreport()
{
gotoxy(5,6);
cout<<"**********************EMPLOYEE'S SALARY REPORT************************";
gotoxy(5,7);
cout<<"======================================================================";
gotoxy(5,8);
cout<<"EMP NO: ";
gotoxy(18,8);
cout<<emp_id;
gotoxy(25,8);
cout<<"NAME : ";
gotoxy(35,8);
cout<<ename;
gotoxy(50,8);
cout<<"ADDRESS: ";
gotoxy(65,8);
cout<<address;
gotoxy(5,9);
cout<<"PHONE NO.: ";
gotoxy(20,9);
cout<<phno;
gotoxy(35,9);
cout<<"DESIGNATION:";
gotoxy(48,9);
cout<<desg;
gotoxy(5,10);
cout<<"=====================================================================";
}
int getempid()
{return emp_id;}
char *getempnm()
{ return ename;}
char *getempadd()
{ return address;}
char *getphno()
{ return phno;}
char *getdesg()
{ return desg;}
void show_cust()
{
gotoxy(5,7);
cout<<"======================================================================";
gotoxy(10,8);
cout<<"EMP NO:";
gotoxy(25,8);
cout<<emp_id;
gotoxy(35,8);
cout<<"NAME OF EMP:";
gotoxy(54,8);
cout<<ename;
gotoxy(10,9);
cout<<"ADDRESS:";
gotoxy(25,9);
cout<<address;
gotoxy(10,10);
cout<<"PHONE NO.:";
gotoxy(25,10);
cout<<phno;
gotoxy(10,12);
cout<<"DESIGNATION:";
gotoxy(25,12);
cout<<desg;
gotoxy(5,14);
cout<<"=====================================================================";
}
void showallcust(int c)
{
gotoxy(1,c);
cout<<emp_id<<setw(17)<<ename<<setw(15)<<address<<setw(25)<<phno<<setw(15)<<desg;
}
void showempdatamulti()
{
gotoxy(5,7);
cout<<"======================================================================";
gotoxy(10,8);
cout<<"EMP NO:";
gotoxy(30,8);
cout<<emp_id;
gotoxy(40,8);
cout<<"NAME OF EMP:";
gotoxy(60,8);
cout<<ename;
gotoxy(10,9);
cout<<"ADDRESS:";
gotoxy(30,9);
cout<<address;
gotoxy(10,10);
cout<<"PHONE NO.:";
gotoxy(30,10);
cout<<phno;
gotoxy(10,11);
cout<<"DESIGNATION:";
gotoxy(25,11);
cout<<desg;
gotoxy(5,11);
cout<<"=====================================================================";
}
void cust_input(int empid);
};
void employee::cust_input(int empid)
{ char ch;
gotoxy(5,7);
cout<<"======================================================================";
gotoxy(10,8);
cout<<"EMP NO:";
emp_id=empid;
gotoxy(24,8);
cout<<emp_id;
gotoxy(35,8);
cout<<"NAME OF EMP:";
gotoxy(54,8);
cin>>ename;
gotoxy(10,9);
cout<<"ADDRESS:";
gotoxy(22,9);
cin>>address;
gotoxy(10,11);
cout<<"PHONE NO.:";
gotoxy(25,11);
cin>>phno;
gotoxy(10,12);
cout<<"DESIGNATION(M for manager,A for asst-manager,S for superwiser,W for worker:";
gotoxy(25,13);
cin>>ch;
switch(ch)
{
case 'M':strcpy(desg,"MANAGER");
break;
case 'A':strcpy(desg,"ASST-MANAGER");
break;
case 'S':strcpy(desg,"SUPERWISER");
break;
default:
strcpy(desg,"WORKER");
}
gotoxy(5,15);
cout<<"=====================================================================";
}
//*************************modify employee details
void employee::modifycust_data(int n1,char nm[15],char add[15],char q[15])
{
char tmpnm[40],tmpnm2[40],tmpnm3[15];
gotoxy(5,14);
cout<<"===================WANT TO MODIFY ===============================";
gotoxy(10,15);
cout<<"EMP NO:";
emp_id=n1;
gotoxy(25,15);
cout<<emp_id;
gotoxy(40,15);
strcpy(ename,nm);
cout<<"NAME OF EMP:";
gotoxy(60,15);
cout<<ename;
gotoxy(10,17);
cout<<"Want to change the name of employee";
gotoxy(50,17);
int flag=0;
while(1)
{
gets(tmpnm);
if(strlen(tmpnm)!=0)
{
flag=1;
break;
}
if(strlen(tmpnm)==0)
{ flag=0;
break;
}
}
if(flag==1)
{ strcpy(ename,tmpnm);
}
gotoxy(1,18);
strcpy(address,add);
//**************** NAME TO BE MODIFY
cout<<"CUSTOMER ADDRESS:";
gotoxy(20,18);
cout<<address;
gotoxy(45,18);
cout<<"Want to change the address";
gotoxy(10,19);
flag=0;
while(1)
{
gets(tmpnm2);
if(strlen(tmpnm2)!=0)
{
flag=1;
break;
}
if(strlen(tmpnm2)==0)
{ flag=0;
break;
}
}
if(flag==1)
{ strcpy(address,tmpnm2);
}
//*****************TO BE MODIFIED ENDS HERE
gotoxy(5,20);
strcpy(phno,q);
//**************** phone no. TO BE MODIFY
cout<<"EMPLOYEE PHONE NO.:";
gotoxy(20,20);
cout<<phno;
gotoxy(45,20);
cout<<"Want to change the phone no.";
gotoxy(70,21);
flag=0;
while(1)
{
gets(tmpnm3);
if(strlen(tmpnm3)!=0)
{
flag=1;
break;
}
if(strlen(tmpnm3)==0)
{ flag=0;
break;
}
}
if(flag==1)
{ strcpy(phno,tmpnm3);
}
char ch;
gotoxy(5,22);
cout<<"DESIGNATION(M for manager,A for asst-manager,S for superwiser,W for worker:";
gotoxy(25,23);
cin>>ch;
switch(ch)
{
case 'M':strcpy(desg,"MANAGER");
break;
case 'A':strcpy(desg,"ASST-MANAGER");
break;
case 'S':strcpy(desg,"SUPERWISER");
break;
default:
strcpy(desg,"WORKER");
}
//*****************MODIFIED ENDS HERE
gotoxy(5,24);
cout<<"=====================================================================";
}
//**************************class function employee modify ends here
//*********************employee class ends here*********************
//****************function to add the records in a file
void write_employee()
{
ofstream objoff;
employee cobj;
objoff.open("employee.dat",ios::out|ios::app);
clrscr();
intromain();
int r=getemployees();
if(r>100)
{
r=1;
}
cobj.cust_input(r);
objoff.write((char*)&cobj,sizeof(employee));
objoff.close();
gotoxy(10,20);
cout<<"***************CUSTOMER RECORD SAVED******************* ";
cin.ignore();
getch();
}
//****************function to add the record in a file ends here
//********************check the employee number already given or not******
int getemployees()
{
ifstream objiff;
employee cust;
int count=0;
objiff.open("employee.dat",ios::binary);
objiff.seekg(0,ios::beg);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
//**************temporary hiding these lines
while(objiff.read((char *) &cust, sizeof(employee)))
{
count++;
}
//***********jump to the last line
objiff.seekg(count-sizeof(cust),ios::beg);
objiff.read((char *) &cust, sizeof(employee));
count=cust.getempid();
count++;
objiff.close();
return count;
}
//***********************check the employee number ends here
//***************************************************************
// function to read specific record from file
//****************************************************************
void display_cust_sp(int n)
{
ifstream objfp;
employee cust;
int flag=0;
objfp.open("employee.dat",ios::binary);
if(!objfp)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(objfp.read((char*)&cust,sizeof(employee)))
{
if(cust.getempid()==n)
{
clrscr();
intromain();
cust.show_cust();
flag=1;
}
}
objfp.close();
if(flag==0)
cout<<"nnrecord not exist";
getch();
}
//**********************employee record sepecific*******************************
//******************************************************************************
// DISPLAY ALL THE CUSTOMER TABULAR FORM
//******************************************************************************
void cust_tabular()
{
int r=0,col=10;
employee cust;
ifstream inFile;
inFile.open("employee.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
display_all_emp();
while(inFile.read((char *) &cust, sizeof(employee)))
{
if(r<=12)
{
r++;
cust.showallcust(col);
col++;
}else
{
gotoxy(20,30);
cout<<"--------------press any key------------------------";
getch();
clrscr();
display_all_emp();
col=10;
r=0;
}
}
inFile.close();
getch();
}
//**************************tabular forms ends**********************************
//function to display all the records of salary
//**********************************************************************
void display_all_emp()
{
clrscr();
intromain();
gotoxy(1,5);
cout<<" **********************EMPLOYEES DETAILS***************************";
gotoxy(1,6);
cout<<"================================================================================";
gotoxy(1,7);
cout<<"CUST.NO"<<setw(10)<<"NAME"<<setw(15)<<"ADDRESS"<<setw(25)<<"PHONE NO"<<setw(15)<<"DESIGNATION";
gotoxy(1,8);
cout<<"================================================================================";
}
//*********************DISPLAY ALL ENDS HERE***************************
//************************************************************
// MODIFY employee RECORD
//**********************************************************
void modify_cust_record(int n)
{
employee cust,temp;
char tmpnm[50],tmpaddress[50];
ifstream inFile;
int fpos1=-1;
inFile.open("employee.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
int flag=0;
while(inFile.read((char *) &cust, sizeof(employee)))
{
if(cust.getempid()==n)
{ clrscr();
intromain();
cust.showempdatamulti();
flag=1;
}
}
inFile.close();
if(flag==0)
cout<<"nnrecord not exist";
else
{
//*******modifying the records starts here
fstream File;
File.open("employee.dat",ios::binary|ios::in|ios::out);
if(!File)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(File.read((char *) &cust, sizeof(employee)))
{
if(cust.getempid()==n)
{ fpos1=(int)File.tellg();
break;
}
}
File.seekp(fpos1-sizeof(employee),ios::beg);
strcpy(tmpnm,cust.getempnm());
strcpy(tmpaddress,cust.getempadd());
char q1[15];
strcpy(q1,cust.getphno());
gotoxy(1,12);
cout<<"*****************************************************************************";
gotoxy(1,13);
cout<<"================ENTER NEW VALUES FOR THE RECORDS GIVEN ABOVE=================";
temp.modifycust_data(n,tmpnm,tmpaddress,q1);
File.write((char *) &temp, sizeof(employee));
File.close();
}
}
//*****************************************************************************
//*****************************************************************************
// DELETE THE RECORD OF THE employee AVAILABLE
//****************************************************************************
void deletecust_record(int n)
{
employee cust;
ifstream inFile;
inFile.open("employee.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
int flag=0;
while(inFile.read((char *) &cust, sizeof(employee)))
{
if(cust.getempid()==n)
{ clrscr();
intromain();
cust.showempdatamulti();
flag=1;
}
}
inFile.close();
char ch;
if(flag==0)
cout<<"nnrecord not exist";
else
{
//*******deletion of the records starts from here
gotoxy(1,15);
cout<<"*****************************************************************************";
gotoxy(5,16);
cout<<"======DO YOU WANT TO DELETE THE RECORDS GIVEN ABOVE[YES(Y) OR NO (N)========";
gotoxy(2,17);
cin>>ch;
if (toupper(ch)=='Y')
{
ofstream outFile;
outFile.open("Temp2.dat",ios::binary);
ifstream objiff("employee.dat",ios::binary);
objiff.seekg(0,ios::beg);
while(objiff.read((char *) &cust, sizeof(employee)))
{
if(cust.getempid()!=n)
{
outFile.write((char *) &cust, sizeof(employee));
}
}
outFile.close();
objiff.close();
remove("employee.dat");
rename("Temp2.dat","employee.dat");
againopenandclosecust();
gotoxy(30,20);
cout<<"----------------------------Record Deleted----------------------------------";
}
}
getch();
}
//***********************delete record ends************************************
void againopenandclosecust()
{
ifstream inFile;
employee cust;
inFile.open("employee.dat",ios::binary);
if(!inFile)
{
getch();
return;
}
while(inFile.read((char *) &cust, sizeof(employee)))
{ }
inFile.close();
}
//***********************search the employee***********************
int searchcust(int p)
{
employee cust;
int tmprt=0;
ifstream inFile;
inFile.open("employee.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
getch();
return -1;
}
int flag=0;
while(inFile.read((char *) &cust, sizeof(employee)))
{
if(cust.getempid()==p)
{ clrscr();
intromain();
cust.showempdatamulti();
flag=1;
tmprt=(int)inFile.tellg();
break;
}
}
inFile.close();
if(flag==0)
return 1;
//cout<<"nnrecord not exist";
else
{
return tmprt;
}
}
//*******************employee information ends*********************
class salary
{
int salid;
int eid;
float basicsal;
float hra,da,ta,pf;
float netsal;
public:
salary()
{
basicsal=hra=da=ta=pf=netsal=0;
}
float getbasic()
{
return basicsal;
}
int getid()
{ return eid;}
void modifydatasalary(int n1,int empid2,float bas,char dsg[15]);
//*****************************************************************************
void showdatamulti()
{
gotoxy(5,7);
cout<<"======================================================================";
gotoxy(5,8);
cout<<"SALARY NO:";
gotoxy(30,8);
cout<<salid;
gotoxy(45,8);
cout<<"EMP ID:";
gotoxy(55,8);
cout<<eid;
gotoxy(5,9);
cout<<"BASIC SALARY:";
gotoxy(27,9);
cout<<basicsal;
gotoxy(35,9);
cout<<"HOUSE RENT ALLOWANCE: ";
gotoxy(60,9);
cout<<hra;
gotoxy(5,10);
cout<<"DEARNESS ALLOWANCE: ";
gotoxy(27,10);
cout<<da;
gotoxy(35,10);
cout<<"TRAVELLING ALLOWANCE:";
gotoxy(60,10);
cout<<ta;
gotoxy(5,11);
cout<<"PROVIDENT FUND:";
gotoxy(22,11);
cout<<pf;
gotoxy(35,11);
cout<<"NET SALARY:";
gotoxy(60,11);
cout<<netsal;
gotoxy(5,12);
cout<<"=====================================================================";
}
//*****************************************************************************
void create_sal(int rn1,char choice[15],int e)
{
//**********************************************
gotoxy(5,7);
cout<<"======================================================================";
gotoxy(5,8);
cout<<"SALARY NO:";
salid=rn1;
gotoxy(30,8);
cout<<salid;
eid=e;
gotoxy(45,8);
cout<<"EMP ID:";
gotoxy(55,8);
cout<<eid;
gotoxy(5,9);
cout<<"BASIC SALARY:";
gotoxy(20,9);
cin>>basicsal;
//*************************************************************************
gotoxy(15,10);
cout<<"********MODIFY**HRA TA DA PF AND NET SALARY ***********";
if(strcmp(choice,"MANAGER")==0)
{
hra=(basicsal*30)/100;
da=(basicsal*28)/100;
ta=(basicsal*15)/100;
pf=(basicsal*10)/100;
netsal=(basicsal+hra+da+ta)-pf;
}else if(strcmp(choice,"ASST-MANAGER")==0)
{
hra=(basicsal*28)/100;
da=(basicsal*25)/100;
ta=(basicsal*12)/100;
pf=(basicsal*9)/100;
netsal=(basicsal+hra+da+ta)-pf;
}else if(strcmp(choice,"SUPERVISOR")==0)
{
hra=(basicsal*25)/100;
da=(basicsal*22)/100;
ta=(basicsal*10)/100;
pf=(basicsal*8)/100;
netsal=(basicsal+hra+da+ta)-pf;
}else
{
hra=(basicsal*20)/100;
da=(basicsal*18)/100;
ta=(basicsal*8)/100;
pf=(basicsal*7)/100;
netsal=(basicsal+hra+da+ta)-pf;
}
gotoxy(5,11);
cout<<"HOUSE RENT ALLOWANCE: ";
gotoxy(28,11);
cout<<hra;
gotoxy(35,11);
cout<<"DEARNESS ALLOWANCE: ";
gotoxy(60,11);
cout<<da;
gotoxy(5,12);
cout<<"TRAVELLING ALLOWANCE:";
gotoxy(30,12);
cout<<ta;
gotoxy(45,12);
cout<<"PROVIDENT FUND:";
gotoxy(65,12);
cout<<pf;
gotoxy(5,13);
cout<<"NET SALARY:";
//netsal=(basicsal+hra+ta+da)-pf;
gotoxy(30,13);
cout<<netsal;
gotoxy(5,15);
cout<<"=====================================================================";
}
void show_salary()
{
//********************************
gotoxy(5,7);
cout<<"======================================================================";
gotoxy(5,8);
cout<<"SALARY NO:";
gotoxy(30,8);
cout<<salid;
gotoxy(45,8);
cout<<"EMP ID:";
gotoxy(55,8);
cout<<eid;
gotoxy(5,9);
cout<<"--------------------------------------------------------------------";
gotoxy(5,10);
cout<<"BASIC SALARY:";
gotoxy(30,10);
cout<<basicsal;
gotoxy(40,10);
cout<<"HOUSE RENT ALLOWANCE: ";
gotoxy(68,10);
cout<<hra;
gotoxy(5,11);
cout<<"DEARNESS ALLOWANCE: ";
gotoxy(30,11);
cout<<da;
gotoxy(40,11);
cout<<"TRAVELLING ALLOWANCE:";
gotoxy(68,11);
cout<<ta;
gotoxy(5,12);
cout<<"PROVIDENT FUND:";
gotoxy(30,12);
cout<<pf;
gotoxy(5,13);
cout<<"--------------------------------------------------------------------";
gotoxy(5,14);
cout<<"NET SALARY:";
gotoxy(30,14);
cout<<netsal;
gotoxy(5,16);
cout<<"=====================================================================";
}
//-----------------------show data tabular form----------------------
void showallsalary(int c)
{
gotoxy(1,c);
cout<<salid<<setw(10)<<eid<<setw(10)<<basicsal<<setw(10)<<hra;
cout<<setw(10)<<da<<setw(10)<<ta<<setw(10)<<pf<<setw(12)<<netsal;
}
//-----------------------ends here------------------------------------
int retsalid()
{return salid;}
}; //class ends here
//***************************************************************
// global declaration for stream object, object
//****************************************************************
//*************************modify salary
void salary::modifydatasalary(int n1,int empid2,float bas,char dsg[15])
{
float tmpbsal=0;
gotoxy(5,14);
cout<<"===================WANT TO MODIFY ===============================";
gotoxy(10,15);
cout<<"SALARY NO:";
salid=n1;
gotoxy(25,15);
cout<<salid;
gotoxy(40,15);
cout<<"EMP ID:";
eid=empid2;
gotoxy(50,15);
cout<<eid;
gotoxy(10,16);
cout<<"BASIC SALARY";
gotoxy(30,16);
basicsal=bas;
cout<<basicsal;
gotoxy(10,17);
cout<<"Want to change the basic salary[0 for no]";
gotoxy(50,17);
cin>>tmpbsal;
if(tmpbsal!=0)
{
basicsal=tmpbsal;
}
gotoxy(5,18);
cout<<"********MODIFY**HRA TA DA PF AND NET SALARY ***********";
if(strcmp(dsg,"MANAGER")==0)
{
hra=(basicsal*30)/100;
da=(basicsal*28)/100;
ta=(basicsal*15)/100;
pf=(basicsal*10)/100;
netsal=(basicsal+hra+da+ta)-pf;
}else if(strcmp(dsg,"ASST-MANAGER")==0)
{
hra=(basicsal*28)/100;
da=(basicsal*25)/100;
ta=(basicsal*12)/100;
pf=(basicsal*9)/100;
netsal=(basicsal+hra+da+ta)-pf;
}else if(strcmp(dsg,"SUPERVISOR")==0)
{
hra=(basicsal*25)/100;
da=(basicsal*22)/100;
ta=(basicsal*10)/100;
pf=(basicsal*8)/100;
netsal=(basicsal+hra+da+ta)-pf;
}else
{
hra=(basicsal*20)/100;
da=(basicsal*18)/100;
ta=(basicsal*8)/100;
pf=(basicsal*7)/100;
netsal=(basicsal+hra+da+ta)-pf;
}
gotoxy(5,20);
cout<<"HRA: "<<hra;
gotoxy(20,20);
cout<<"DA: "<<da;
gotoxy(35,20);
cout<<"TA: "<<ta;
gotoxy(55,20);
cout<<"PF: "<<pf;
gotoxy(5,21);
cout<<"-------------------------------------------------------------------";
gotoxy(25,22);
cout<<"NET SALARY: "<<netsal;
gotoxy(5,23);
cout<<"-------------------------------------------------------------------";
gotoxy(5,25);
cout<<"=====================================================================";
}
//**************************class function outside
fstream fp;
salary sal;
//***************************************************************
// function to write in file
//****************************************************************
void write_salary()
{ifstream objiff("employee.dat",ios::binary);
char str1[15];
employee eobj;
int flag=0,eid;
fp.open("salary.dat",ios::binary|ios::out|ios::app);
clrscr();
intromain();
int rnn=getsalary();
if(rnn>100)
{
rnn=1;
}
cout<<"Enter the employee no:";
cin>>eid;
while(objiff.read((char*)&eobj,sizeof(employee)))
{
if(eobj.getempid()==eid)
{
clrscr();
intromain();
eobj.show_cust();
strcpy(str1,eobj.getdesg());
flag=1;
break;
}
}
objiff.close();
if(flag==0)
{ cout<<"nnrecord not exist";
getch();
}else
{
if(flag==1)
{ clrscr();
intromain();
//*****************************************
sal.create_sal(rnn,str1,eid);
fp.write((char*)&sal,sizeof(salary));
gotoxy(10,20);
cout<<"***************SALARY RECORD SAVED******************* ";
}
} cin.ignore();
fp.close();
getch();
}
//********************check the salary number already given or not******
int getsalary()
{
ifstream objiff;
salary st;
int count=0;
objiff.open("salary.dat",ios::binary);
objiff.seekg(0,ios::beg);
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
}
//**************temporary hiding these lines
while(objiff.read((char *) &st, sizeof(salary)))
{
count++;
}
//***********jump to the last line
objiff.seekg(count-sizeof(st),ios::beg);
objiff.read((char *) &st, sizeof(salary));
count=st.retsalid();
count++;
objiff.close();
return count;
}
//***************************************************************
// function to read specific record from file
//****************************************************************
void display_sp_sal(int n)
{
int flag=0;
fp.open("salary.dat",ios::in);
if(!fp)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(fp.read((char*)&sal,sizeof(salary)))
{
if(sal.retsalid()==n)
{
clrscr();
intromain();
sal.show_salary();
flag=1;
}
}
fp.close();
if(flag==0)
cout<<"nnrecord not exist";
getch();
}
//******************************************************************
// function before display salary report check the employee id
//******************************************************************
int before_order()
{ int f=-1,num=0;
employee cust;
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE EMP ID TO BE SEARCHED:";
gotoxy(55,9);
cin>>num;
ifstream inFile;
inFile.open("employee.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
getch();
return -1;
}
while(inFile.read((char *) &cust, sizeof(employee)))
{
if(cust.getempid()==num)
{ clrscr();
intromain();
cust.showempdatamulti();
f=1;
break;
}
}
inFile.close();
return f;
}
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
void intro()
{
gotoxy(4,2);
cout<<"***************************EMPLOYEES-MANAGEMENT*************************";
gotoxy(12,4);
cout<<"===========================================================";
gotoxy(5,5);
cout<<"****************************S=Y=S=T=E=M********************************";
gotoxy(50,10);
cout<<"PROJECT:";
gotoxy(50,12);
cout<<"MADE BY : TUSHAR";
gotoxy(10,14);
cout<<"---------------SCHOOL : DOON PUBLIC SCHOOL--------------------";
getch();
}
//***************************************************************
// ADMINSTRATOR MENU1 FUNCTION
//****************************************************************
void admin_menu1()
{
clrscr();
char ch2;
int num;
clrscr();
intromain();
gotoxy(20,6);
cout<<"=================ADMIN MENU====================";
gotoxy(22,7);
cout<<"1.CREATE EMPLOYEE DETAILS";
gotoxy(22,8);
cout<<"2.DISPLAY ALL EMPLOYEE'S DETAILS";
gotoxy(22,9);
cout<<"3.SEARCH RECORD(QUERY) ";
gotoxy(22,10);
cout<<"4.MODIFY EMPLOYEE RECORDS";
gotoxy(22,11);
cout<<"5.DELETE EMPLOYEE RECORDS";
gotoxy(22,12);
cout<<"6.BACK TO MAIN MENU";
gotoxy(18,13);
cout<<"Please Enter Your Choice (1-6) ";
gotoxy(55,13);
//**********************************************************
ch2=getche();
switch(ch2)
{
case '1': clrscr();
write_employee();
break;
case '2': cust_tabular();
break;
case '3':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE EMP ID TO BE SEARCHED:";
gotoxy(55,9);
cin>>num;
display_cust_sp(num);
break;
case '4':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE EMP ID TO BE SEARCHED AND MODIFY:";
gotoxy(55,9);
cin>>num;
modify_cust_record(num);
break;
case '5':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE EMP ID TO BE SEARCHED AND TO DELETE:";
gotoxy(55,9);
cin>>num;
deletecust_record(num);
break;
case '6': break;
default:cout<<"a";admin_menu1();
}
}
//***********************MENU 1 CUSTOMERS ENDS HERE*************************
//***************************************************************
// ADMINSTRATOR MENU2 FUNCTION
//****************************************************************
void admin_menu()
{
clrscr();
char ch2;
int num;
//************************************************************
clrscr();
intromain();
gotoxy(20,6);
cout<<"=================ADMIN MENU====================";
gotoxy(22,7);
cout<<"1.CREATE SALARY DATA OF EMPLOYEE";
gotoxy(22,8);
cout<<"2.DISPLAY ALL SALARY REPORT'S AVAILABEL";
gotoxy(22,9);
cout<<"3.SEARCH AND DISPLAY SALARY RECORD(QUERY) ";
gotoxy(22,10);
cout<<"4.MODIFY SALARY INFORMATION";
gotoxy(22,11);
cout<<"5.DELETE SALARY INFORMATION";
gotoxy(22,12);
cout<<"6.BACK TO MAIN MENU";
gotoxy(18,13);
cout<<"Please Enter Your Choice (1-6) ";
gotoxy(55,13);
//**********************************************************
ch2=getche();
switch(ch2)
{
case '1': clrscr();
write_salary();
break;
case '2': salary_tabular();
break;
case '3':
//********************
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE SALARY ID TO BE SEARCHED:";
gotoxy(55,9);
cin>>num;
display_sp_sal(num);
break;
case '4':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE SALARY ID TO BE SEARCHED AND MODIFY:";
gotoxy(55,9);
cin>>num;
modify_recordsalary(num);
break;
case '5':
clrscr();
intromain();
gotoxy(10,8);
cout<<"*****ENTER THE SALARY ID TO BE SEARCHED AND TO DELETE:";
gotoxy(55,9);
cin>>num;
delete_recordsalary(num);
break;
case '6': break;
default:cout<<"a";admin_menu();
}
}
//***************************************************************
// THE MAIN FUNCTION OF PROGRAM
//****************************************************************
void main()
{
char ch; int n=0;
intro();
do {
//****************TEMPORARY***********************
clrscr();
intromain(); gotoxy(20,6);
cout<<"=================MAIN MENU====================";
gotoxy(28,7); cout<<"01. SALARY REPORT GENERATOR";
gotoxy(28,8); cout<<"02. ADMINISTRATOR";
gotoxy(28,9); cout<<"03. EXIT";
gotoxy(20,10); cout<<"==============================================";
gotoxy(25,12); cout<<"Please Select Your Option (1-3) ";
gotoxy(30,14);
ch=getche();
switch(ch)
{
case '1':
clrscr();
intromain();
gotoxy(10,8);cout<<"*****ENTER THE EMP ID TO BE SEARCHED:";
gotoxy(55,9);cin>>n;
printreportsalary(n);
getch();
break;
case '2': middleadminmenu();
break;
case '3':exit(0);
default :cout<<"a";
}
}while(ch!='3');
}
//***************main intro
void intromain()
{ clrscr();
gotoxy(1,2);
cout<<"**********EMPLOYEE******MANAGEMENT****SYSTEM******PROJECT**********************";
gotoxy(1,3);
cout<<"******************************************************************************";
}
//******************************************************************************
// DISPLAY ALL THE PRODUCT TABULAR FORM
//******************************************************************************
void salary_tabular()
{
int r=0,col=10;
salary st;
ifstream inFile;
inFile.open("salary.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
display_all();
while(inFile.read((char *) &st, sizeof(salary)))
{
if(r<=12)
{
r++;
st.showallsalary(col);
col++;
}else
{
gotoxy(20,30); cout<<"--------------press any key------------------------";
getch(); clrscr();
display_all();
col=10;
r=0;
}
}
inFile.close();
getch();
}
//**************************tabular forms ends**********************************
//*******************tabulars forms headings************************************
//function to display all the records of salary
//**********************************************************************
void display_all()
{
clrscr();
intromain();
gotoxy(1,5);
cout<<" **********************EMPLOYEE'S SALARY'S DETAILS*************************";
gotoxy(1,6);
cout<<"================================================================================";
gotoxy(1,7);
cout<<"SALNO"<<setw(10)<<"EMP NO"<<setw(10)<<"BASICSAL"<<setw(10)<<"HRA"<<setw(10)<<"DA"<<setw(10)<<" TA
"<<setw(10)<<" PF "<<setw(12)<<"NET SAL";
gotoxy(1,8);
cout<<"================================================================================";
}
//************************************************************
// MODIFY RECORD
//**********************************************************
void modify_recordsalary(int n)
{
salary st,temp;
ifstream inFile;
int fpos=-1;
inFile.open("salary.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
int flag=0;
while(inFile.read((char *) &st, sizeof(salary)))
{
if(st.retsalid()==n)
{ clrscr();
intromain();
st.showdatamulti();
flag=1;
}
}
inFile.close();
if(flag==0)
cout<<"nnrecord not exist";
else
{
//*******modifying the records starts here
fstream File;
File.open("salary.dat",ios::binary|ios::in|ios::out);
if(!File)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(File.read((char *) &st, sizeof(salary)))
{
if(st.retsalid()==n)
{ fpos=(int)File.tellg();
break;
}
}
File.seekp(fpos-sizeof(salary),ios::beg);
ifstream objemp("employee.dat",ios::binary);
employee ee;
float bassic=st.getbasic();
int empid;
empid=st.getid();
//int fpos2=0;
char ds[35];
//****************search the employee record ***************
while(objemp)
{
objemp.read((char*)&ee,sizeof(ee));
if(ee.getempid()==empid)
{ //fpos2=(int)File.tellg();
break;
}
}
//objemp.seekg(fpos2-sizeof(employee),ios::beg);
strcpy(ds,ee.getdesg());
objemp.close();
//*********************************************************
gotoxy(1,12);
cout<<"*****************************************************************************";
gotoxy(1,13);
cout<<"================ENTER NEW VALUES FOR THE RECORDS GIVEN ABOVE=================";
temp.modifydatasalary(n,empid,bassic,ds);
File.write((char *) &temp, sizeof(salary));
File.close();
}
}
//*****************************************************************************
// DELETE THE RECORD OF THE PRODUCTC NOT AVAILABLE
//****************************************************************************
void delete_recordsalary(int n)
{
salary st;
ifstream inFile;
inFile.open("salary.dat",ios::binary);
if(!inFile)
{ cout<<"File could not be open !! Press any Key...";
getch();
return;
}
int flag=0;
while(inFile.read((char *) &st, sizeof(salary)))
{ if(st.retsalid()==n)
{ clrscr();
intromain();
st.showdatamulti();
flag=1;
}
}
inFile.close();
char ch;
if(flag==0)
cout<<"nnrecord not exist";
else {
//*******deletion of the records starts from here
gotoxy(1,15);
cout<<"*****************************************************************************";
gotoxy(5,16);
cout<<"======DO YOU WANT TO DELETE THE RECORDS GIVEN ABOVE[YES(Y) OR NO (N)========";
gotoxy(2,17);
cin>>ch;
if (toupper(ch)=='Y')
{
ofstream outFile;
outFile.open("Temp1.dat",ios::binary);
ifstream objiff("salary.dat",ios::binary);
objiff.seekg(0,ios::beg);
while(objiff.read((char *) &st, sizeof(salary)))
{ if(st.retsalid()!=n)
{ outFile.write((char *) &st, sizeof(salary)); }
}
outFile.close();
objiff.close();
remove("salary.dat");
rename("Temp1.dat","salary.dat");
againopenandclose();
gotoxy(30,20);
cout<<"----------------------------Record Deleted----------------------------------";
} } getch();
}
//***********************delete record ends************************************
void againopenandclose()
{
ifstream inFile;
salary st;
inFile.open("salary.dat",ios::binary);
if(!inFile)
{
getch();
return;
}
while(inFile.read((char *) &st, sizeof(salary)))
{ }
inFile.close();
}
//***********************search the salary***********************
int search(int p)
{
salary st;
int tmprt=0;
ifstream inFile;
inFile.open("salary.dat",ios::binary);
if(!inFile)
{ cout<<"File could not be open !! Press any Key...";
getch();
return -1;
}
int flag=0;
while(inFile.read((char *) &st, sizeof(salary)))
{ if(st.retsalid()==p)
{ clrscr();
intromain();
st.showdatamulti();
flag=1;
tmprt=(int)inFile.tellg();
break;
} }
inFile.close();
if(flag==0)
return 1;
//cout<<"nnrecord not exist";
else
{ return tmprt; }
}
void middleadminmenu()
{
char ch;
do
{
//****************TEMPORARY***********************
clrscr();
intromain();
gotoxy(20,6);
cout<<"===========EMPLOYEE'S-SALARY'S MENU===========";
gotoxy(28,7); cout<<"01. EMPLOYEE'S MENU";
gotoxy(28,8); cout<<"02. SALARY'S MENU";
gotoxy(28,9); cout<<"03. BACK TO MAIN";
gotoxy(20,10);
cout<<"==============================================";
gotoxy(25,12); cout<<"Please Select Your Option (1-3) ";
gotoxy(30,14);
ch=getche();
switch(ch)
{
case '1': admin_menu1();
break;
case '2': admin_menu();
break;
case '3': break;
default :cout<<"a";admin_menu();
}
}while(ch!='3');
}
//******************print the report of salary of employees
void printreportsalary(int empno)
{
ifstream objiff("employee.dat",ios::binary);
employee empobj;
int flag=0;
if(!objiff)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
clrscr();
while(objiff.read((char *) &empobj, sizeof(employee)))
{
if(empobj.getempid()==empno)
{ clrscr();
intromain();
empobj.showempreport();
flag=1;
break;
}
}
int id=empobj.getempid();
objiff.close();
if(flag==0)
cout<<"nnrecord not exist";
else
{
ifstream objsal("salary.dat",ios::binary);
salary salobj;
gotoxy(1,11);
cout<<"SALNO"<<setw(10)<<"EMP NO"<<setw(10)<<"BASICSAL"<<setw(10)<<"HRA"<<setw(10)<<"DA"<<setw(10)<<" TA
"<<setw(10)<<" PF "<<setw(12)<<"NET SAL";
gotoxy(1,12);
cout<<"================================================================================";
int cno=13;
int r=0;
if(!objsal)
{
cout<<"File could not be open !! Press any Key...";
getch();
return;
}
while(objsal.read((char *) &salobj, sizeof(salary)))
{
if(salobj.getid()==id)
{
salobj.showallsalary(cno);
cno++;
if(r<=15)
{
r++;
}else
{
gotoxy(20,30); cout<<"--------------press any key------------------------";
getch(); clrscr(); display_all();
cno=10; r=0;
}
}
}
objsal.close();
}
}//***************************************************************
// END OF PROJECT
//***************************************************************
if choice is: 2
if choice is: 1
if choice is 2: salary details
REQUIREMENTS
HARDWARE REQUIRED
• Printer, to print the required documents of the project
• Compact Drive
• Processor : intel
• Ram : 512 MB or more than 512MB
• Harddisk : 80 GB or more than 80GB.
SOFTWARE REQUIRED
• Operating system : Windows XP
• Turbo C++, for execution of program and Ms word, for
presentation of output.
ADVANTAGES
• An employee does not need to worry about their salary details.
• This software reduces paper work.
• It is easy to handle Employee’s record.
• This software saves the time.
• Information of the employees stores permanently.
• Employee can also get the details of their salary yearly or monthly.
DISADVANTAGES
• This system suitable for only small organization.
• Online facility is not available.
CONCLUSION
This software is efficient in maintaining employee’s details and
can easily perform operations on salary of the employees. This
software also reduces the work load of the department which
works on maintaining the records of the employees.
In future, this system can launch web site for easy online data
entry.
SYSTEM DESIGN
Then we began with the design phase of the system. System design is a solution, a
“HOW TO” approach to the creation of a new system. It translates system
requirements into ways by which they can be made operational. It is a
translational from a user oriented document to a document oriented
programmers. For that, it provides the understanding and procedural details
necessary for the implementation. Here we use Flowchart to supplement the
working of the new system. The system thus made should be reliable, durable and
above all should have least possible maintenance costs. It should overcome all the
drawbacks of the Old existing system and most important of all meet the user
requirements.
START
1-employees salary reports
2-Administrator
3- Exit
IF CHOICE =1
IF CHOICE =2
IF CHOICE =3
THEN
STOP
Display the salary report of the
eemployee
Add/modify/delete/search of the
employees and the salary of the
employees
QUIT

More Related Content

What's hot

Airline reservation system
Airline reservation systemAirline reservation system
Airline reservation system
Unsa Jawaid
 
Employee Management System
Employee Management SystemEmployee Management System
Employee Management System
vivek shah
 
Airline Reservation System
Airline Reservation SystemAirline Reservation System
Airline Reservation System
Sahil Talwar
 
Student information system project
Student information system projectStudent information system project
Student information system project
Rizwan Ashraf
 
Student management system university erp
Student management system   university erpStudent management system   university erp
Student management system university erp
Mehul Thakkar
 
Hospital management system project
Hospital management system projectHospital management system project
Hospital management system project
Himani Chopra
 
SCHOOL BUS ROUTING MANAGEMENT SYSTEM [FINAL]
SCHOOL BUS ROUTING MANAGEMENT SYSTEM [FINAL]SCHOOL BUS ROUTING MANAGEMENT SYSTEM [FINAL]
SCHOOL BUS ROUTING MANAGEMENT SYSTEM [FINAL]
ayushi goyal
 
sports management synopsis
sports management synopsissports management synopsis
sports management synopsis
kaushik pandey
 
Online course reservation system
Online course reservation systemOnline course reservation system
Online course reservation system
Chamma Jabeedkhan
 
Online movie ticket booking system
Online movie ticket booking systemOnline movie ticket booking system
Online movie ticket booking system
Sikandar Pandit
 
Final Year Project of Online Food Ordering System
Final Year Project of Online Food Ordering SystemFinal Year Project of Online Food Ordering System
Final Year Project of Online Food Ordering System
SidraShehbaz
 
Synopsis for Online Railway Railway Reservation System
Synopsis for Online Railway Railway Reservation SystemSynopsis for Online Railway Railway Reservation System
Synopsis for Online Railway Railway Reservation System
ZainabNoorGul
 
C++ project on police station software
C++ project on police station softwareC++ project on police station software
C++ project on police station software
dharmenderlodhi021
 
SRS on Online Blood Bank Managment system...
SRS on Online Blood Bank Managment system... SRS on Online Blood Bank Managment system...
SRS on Online Blood Bank Managment system...
GCWUF
 
Hostel management
Hostel managementHostel management
Hostel management
Himanshu Sajwan
 
student management system.pdf
student management system.pdfstudent management system.pdf
student management system.pdf
SATYADEVDUSHADH1
 
College mgmnt system
College mgmnt systemCollege mgmnt system
College mgmnt system
Sayali Birari
 
Course registration system dfd
Course registration system dfdCourse registration system dfd
Course registration system dfd
Utsav mistry
 
Student Attendance System ppt
Student Attendance System pptStudent Attendance System ppt
Student Attendance System ppt
Manishasingh755956
 
408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docx408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docx
santhoshyadav23
 

What's hot (20)

Airline reservation system
Airline reservation systemAirline reservation system
Airline reservation system
 
Employee Management System
Employee Management SystemEmployee Management System
Employee Management System
 
Airline Reservation System
Airline Reservation SystemAirline Reservation System
Airline Reservation System
 
Student information system project
Student information system projectStudent information system project
Student information system project
 
Student management system university erp
Student management system   university erpStudent management system   university erp
Student management system university erp
 
Hospital management system project
Hospital management system projectHospital management system project
Hospital management system project
 
SCHOOL BUS ROUTING MANAGEMENT SYSTEM [FINAL]
SCHOOL BUS ROUTING MANAGEMENT SYSTEM [FINAL]SCHOOL BUS ROUTING MANAGEMENT SYSTEM [FINAL]
SCHOOL BUS ROUTING MANAGEMENT SYSTEM [FINAL]
 
sports management synopsis
sports management synopsissports management synopsis
sports management synopsis
 
Online course reservation system
Online course reservation systemOnline course reservation system
Online course reservation system
 
Online movie ticket booking system
Online movie ticket booking systemOnline movie ticket booking system
Online movie ticket booking system
 
Final Year Project of Online Food Ordering System
Final Year Project of Online Food Ordering SystemFinal Year Project of Online Food Ordering System
Final Year Project of Online Food Ordering System
 
Synopsis for Online Railway Railway Reservation System
Synopsis for Online Railway Railway Reservation SystemSynopsis for Online Railway Railway Reservation System
Synopsis for Online Railway Railway Reservation System
 
C++ project on police station software
C++ project on police station softwareC++ project on police station software
C++ project on police station software
 
SRS on Online Blood Bank Managment system...
SRS on Online Blood Bank Managment system... SRS on Online Blood Bank Managment system...
SRS on Online Blood Bank Managment system...
 
Hostel management
Hostel managementHostel management
Hostel management
 
student management system.pdf
student management system.pdfstudent management system.pdf
student management system.pdf
 
College mgmnt system
College mgmnt systemCollege mgmnt system
College mgmnt system
 
Course registration system dfd
Course registration system dfdCourse registration system dfd
Course registration system dfd
 
Student Attendance System ppt
Student Attendance System pptStudent Attendance System ppt
Student Attendance System ppt
 
408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docx408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docx
 

Similar to SALARY MANAGEMENT SYSTEM IN C++

CANTEEN MANAGEMENT SYSTEM IN C++
CANTEEN MANAGEMENT SYSTEM IN C++CANTEEN MANAGEMENT SYSTEM IN C++
CANTEEN MANAGEMENT SYSTEM IN C++
vikram mahendra
 
BOOK SHOP SYSTEM C++
BOOK SHOP SYSTEM C++BOOK SHOP SYSTEM C++
BOOK SHOP SYSTEM C++
vikram mahendra
 
Electricitybillsystemreport
ElectricitybillsystemreportElectricitybillsystemreport
Electricitybillsystemreport
vikram mahendra
 
Telephone billing system in c++
Telephone billing system in c++Telephone billing system in c++
Telephone billing system in c++
vikram mahendra
 
Library Management System in c++
Library Management System in c++Library Management System in c++
Library Management System in c++
vikram mahendra
 
c++ project
c++ projectc++ project
c++ project
Trish004
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
dezyneecole
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
dezyneecole
 
Tugas praktikukm pemrograman c++
Tugas praktikukm  pemrograman c++Tugas praktikukm  pemrograman c++
Tugas praktikukm pemrograman c++
Dendi Riadi
 
project report on Gas booking system in c++
project report on Gas booking system in c++ project report on Gas booking system in c++
project report on Gas booking system in c++
vikram mahendra
 
Contoh program c++ kalkulator
Contoh program c++ kalkulatorContoh program c++ kalkulator
Contoh program c++ kalkulator
JsHomeIndustry
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third Year
Dezyneecole
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
vikram mahendra
 
Computer Science Project on Management System
Computer Science Project on Management System Computer Science Project on Management System
Computer Science Project on Management System
SajidAli643
 
STUDENT REPORT CARD GENERATE SYSTEM
STUDENT REPORT CARD GENERATE SYSTEMSTUDENT REPORT CARD GENERATE SYSTEM
STUDENT REPORT CARD GENERATE SYSTEM
vikram mahendra
 
Shikh Mohammad Usman Haidar , BCA Third Year
Shikh Mohammad Usman Haidar , BCA Third YearShikh Mohammad Usman Haidar , BCA Third Year
Shikh Mohammad Usman Haidar , BCA Third Year
Dezyneecole
 
Python Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemPython Project On Cosmetic Shop system
Python Project On Cosmetic Shop system
vikram mahendra
 
Tik tic tok
Tik tic tokTik tic tok
Tik tic tok
RIDDHICHOUHAN2
 
BLOOD DONATION SYSTEM IN C++
BLOOD DONATION SYSTEM IN C++BLOOD DONATION SYSTEM IN C++
BLOOD DONATION SYSTEM IN C++
vikram mahendra
 
Tic tac toe
Tic tac toeTic tac toe
Tic tac toe
KrishanKantGupta5
 

Similar to SALARY MANAGEMENT SYSTEM IN C++ (20)

CANTEEN MANAGEMENT SYSTEM IN C++
CANTEEN MANAGEMENT SYSTEM IN C++CANTEEN MANAGEMENT SYSTEM IN C++
CANTEEN MANAGEMENT SYSTEM IN C++
 
BOOK SHOP SYSTEM C++
BOOK SHOP SYSTEM C++BOOK SHOP SYSTEM C++
BOOK SHOP SYSTEM C++
 
Electricitybillsystemreport
ElectricitybillsystemreportElectricitybillsystemreport
Electricitybillsystemreport
 
Telephone billing system in c++
Telephone billing system in c++Telephone billing system in c++
Telephone billing system in c++
 
Library Management System in c++
Library Management System in c++Library Management System in c++
Library Management System in c++
 
c++ project
c++ projectc++ project
c++ project
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
 
Tugas praktikukm pemrograman c++
Tugas praktikukm  pemrograman c++Tugas praktikukm  pemrograman c++
Tugas praktikukm pemrograman c++
 
project report on Gas booking system in c++
project report on Gas booking system in c++ project report on Gas booking system in c++
project report on Gas booking system in c++
 
Contoh program c++ kalkulator
Contoh program c++ kalkulatorContoh program c++ kalkulator
Contoh program c++ kalkulator
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third Year
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
 
Computer Science Project on Management System
Computer Science Project on Management System Computer Science Project on Management System
Computer Science Project on Management System
 
STUDENT REPORT CARD GENERATE SYSTEM
STUDENT REPORT CARD GENERATE SYSTEMSTUDENT REPORT CARD GENERATE SYSTEM
STUDENT REPORT CARD GENERATE SYSTEM
 
Shikh Mohammad Usman Haidar , BCA Third Year
Shikh Mohammad Usman Haidar , BCA Third YearShikh Mohammad Usman Haidar , BCA Third Year
Shikh Mohammad Usman Haidar , BCA Third Year
 
Python Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemPython Project On Cosmetic Shop system
Python Project On Cosmetic Shop system
 
Tik tic tok
Tik tic tokTik tic tok
Tik tic tok
 
BLOOD DONATION SYSTEM IN C++
BLOOD DONATION SYSTEM IN C++BLOOD DONATION SYSTEM IN C++
BLOOD DONATION SYSTEM IN C++
 
Tic tac toe
Tic tac toeTic tac toe
Tic tac toe
 

More from vikram mahendra

Communication skill
Communication skillCommunication skill
Communication skill
vikram mahendra
 
Python Project on Computer Shop
Python Project on Computer ShopPython Project on Computer Shop
Python Project on Computer Shop
vikram mahendra
 
PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEM
vikram mahendra
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
vikram mahendra
 
FLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHONFLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHON
vikram mahendra
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHON
vikram mahendra
 
FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHON
vikram mahendra
 
OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1
vikram mahendra
 
OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2
vikram mahendra
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2
vikram mahendra
 
DATA TYPE IN PYTHON
DATA TYPE IN PYTHONDATA TYPE IN PYTHON
DATA TYPE IN PYTHON
vikram mahendra
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
vikram mahendra
 
USER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHONUSER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHON
vikram mahendra
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
vikram mahendra
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHON
vikram mahendra
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
vikram mahendra
 
GREEN SKILL[PART-2]
GREEN SKILL[PART-2]GREEN SKILL[PART-2]
GREEN SKILL[PART-2]
vikram mahendra
 
GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]
vikram mahendra
 
Dictionary in python
Dictionary in pythonDictionary in python
Dictionary in python
vikram mahendra
 
Entrepreneurial skills
Entrepreneurial skillsEntrepreneurial skills
Entrepreneurial skills
vikram mahendra
 

More from vikram mahendra (20)

Communication skill
Communication skillCommunication skill
Communication skill
 
Python Project on Computer Shop
Python Project on Computer ShopPython Project on Computer Shop
Python Project on Computer Shop
 
PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEM
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
 
FLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHONFLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHON
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHON
 
FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHON
 
OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1
 
OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2
 
DATA TYPE IN PYTHON
DATA TYPE IN PYTHONDATA TYPE IN PYTHON
DATA TYPE IN PYTHON
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
 
USER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHONUSER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHON
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHON
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
GREEN SKILL[PART-2]
GREEN SKILL[PART-2]GREEN SKILL[PART-2]
GREEN SKILL[PART-2]
 
GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]
 
Dictionary in python
Dictionary in pythonDictionary in python
Dictionary in python
 
Entrepreneurial skills
Entrepreneurial skillsEntrepreneurial skills
Entrepreneurial skills
 

Recently uploaded

A Quiz on Drug Abuse Awareness by Quizzito
A Quiz on Drug Abuse Awareness by QuizzitoA Quiz on Drug Abuse Awareness by Quizzito
A Quiz on Drug Abuse Awareness by Quizzito
Quizzito The Quiz Society of Gargi College
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
Kalna College
 
The Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptxThe Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptx
PriyaKumari928991
 
Creating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptxCreating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptx
Forum of Blended Learning
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
 
Keynote given on June 24 for MASSP at Grand Traverse City
Keynote given on June 24 for MASSP at Grand Traverse CityKeynote given on June 24 for MASSP at Grand Traverse City
Keynote given on June 24 for MASSP at Grand Traverse City
PJ Caposey
 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
BiplabHalder13
 
Decolonizing Universal Design for Learning
Decolonizing Universal Design for LearningDecolonizing Universal Design for Learning
Decolonizing Universal Design for Learning
Frederic Fovet
 
Diversity Quiz Finals by Quiz Club, IIT Kanpur
Diversity Quiz Finals by Quiz Club, IIT KanpurDiversity Quiz Finals by Quiz Club, IIT Kanpur
Diversity Quiz Finals by Quiz Club, IIT Kanpur
Quiz Club IIT Kanpur
 
(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"
MJDuyan
 
Cross-Cultural Leadership and Communication
Cross-Cultural Leadership and CommunicationCross-Cultural Leadership and Communication
Cross-Cultural Leadership and Communication
MattVassar1
 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
Kalna College
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
Friends of African Village Libraries
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Kalna College
 
8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity
RuchiRathor2
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapitolTechU
 
managing Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptxmanaging Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptx
nabaegha
 
The basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptxThe basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptx
heathfieldcps1
 
Erasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES CroatiaErasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES Croatia
whatchangedhowreflec
 

Recently uploaded (20)

A Quiz on Drug Abuse Awareness by Quizzito
A Quiz on Drug Abuse Awareness by QuizzitoA Quiz on Drug Abuse Awareness by Quizzito
A Quiz on Drug Abuse Awareness by Quizzito
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
 
The Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptxThe Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptx
 
Creating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptxCreating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptx
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
 
Keynote given on June 24 for MASSP at Grand Traverse City
Keynote given on June 24 for MASSP at Grand Traverse CityKeynote given on June 24 for MASSP at Grand Traverse City
Keynote given on June 24 for MASSP at Grand Traverse City
 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
 
Decolonizing Universal Design for Learning
Decolonizing Universal Design for LearningDecolonizing Universal Design for Learning
Decolonizing Universal Design for Learning
 
Diversity Quiz Finals by Quiz Club, IIT Kanpur
Diversity Quiz Finals by Quiz Club, IIT KanpurDiversity Quiz Finals by Quiz Club, IIT Kanpur
Diversity Quiz Finals by Quiz Club, IIT Kanpur
 
(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"
 
Cross-Cultural Leadership and Communication
Cross-Cultural Leadership and CommunicationCross-Cultural Leadership and Communication
Cross-Cultural Leadership and Communication
 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
 
8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
 
managing Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptxmanaging Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptx
 
The basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptxThe basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptx
 
Erasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES CroatiaErasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES Croatia
 

SALARY MANAGEMENT SYSTEM IN C++

  • 2. ACKNOWLEDGEMENT I would like to convey my heartful thanks to ……………….. (Computer Science) who always gave valuable suggestions & guidance for completion of my project. He helped me to understand & remember important details of the project. My project has been a success only because of his guidance. I am especially indented & I am also beholden to my friends. And finally I thank to the members of my family for their support & encouragement.
  • 3. CERTIFICATE This is to certify that ……………………of ………… of ………………………………… has completed his project under my supervision. He has taken proper care & shown sincerity in completion of this project. I certify that this project is up to my expectation & as per the guideline issued by CBSE. ………………………………. (Computer Science faculty )
  • 4. Content 1. Introduction 2. Source Code 3. Output 4. Requirement 5. Advantages and disadvantages 6. Conclusion 7. System design
  • 5. This project SALARY MANAGEMENT SYSTEM includes some facilities of managing the salary of the employees. It also save the records of employee’s details and administrator can search, display, modification, delete etc. This software searches the employee data which is store in the record and after that print the salary report of the employee. The software used for small company to maintain their records related to employees and salary.
  • 6.
  • 7. //*************************************************************** // HEADER FILE USED IN PROJECT //**************************************************************** #include<conio.h> #include<stdio.h> #include<process.h> #include<fstream.h> #include<iomanip.h> #include<string.h> #include<ctype.h> void middleadminmenu(); void printreportsalary(int empno); void intromain(); int getsalary(); int getemployees(); void display_all(); void display_all_emp(); void salary_tabular(); void modify_recordsalary(int n); void delete_recordsalary(int n); void againopenandclose(); void againopenandclosecust(); int search(int p); //void changeqty(int pr1,int q11); //*************************************************************** // CLASS USED IN PROJECT //**************************************************************** //*******************information**************************** class employee { int emp_id; char ename[25]; char address[35]; char phno[15]; char desg[35]; public: void modifycust_data(int n1,char nm[15],char add[15],char q[15]); void showempreport() { gotoxy(5,6); cout<<"**********************EMPLOYEE'S SALARY REPORT************************"; gotoxy(5,7); cout<<"======================================================================"; gotoxy(5,8); cout<<"EMP NO: "; gotoxy(18,8); cout<<emp_id; gotoxy(25,8); cout<<"NAME : "; gotoxy(35,8); cout<<ename; gotoxy(50,8); cout<<"ADDRESS: "; gotoxy(65,8); cout<<address; gotoxy(5,9); cout<<"PHONE NO.: "; gotoxy(20,9); cout<<phno; gotoxy(35,9); cout<<"DESIGNATION:"; gotoxy(48,9); cout<<desg; gotoxy(5,10); cout<<"====================================================================="; } int getempid() {return emp_id;} char *getempnm()
  • 8. { return ename;} char *getempadd() { return address;} char *getphno() { return phno;} char *getdesg() { return desg;} void show_cust() { gotoxy(5,7); cout<<"======================================================================"; gotoxy(10,8); cout<<"EMP NO:"; gotoxy(25,8); cout<<emp_id; gotoxy(35,8); cout<<"NAME OF EMP:"; gotoxy(54,8); cout<<ename; gotoxy(10,9); cout<<"ADDRESS:"; gotoxy(25,9); cout<<address; gotoxy(10,10); cout<<"PHONE NO.:"; gotoxy(25,10); cout<<phno; gotoxy(10,12); cout<<"DESIGNATION:"; gotoxy(25,12); cout<<desg; gotoxy(5,14); cout<<"====================================================================="; } void showallcust(int c) { gotoxy(1,c); cout<<emp_id<<setw(17)<<ename<<setw(15)<<address<<setw(25)<<phno<<setw(15)<<desg; } void showempdatamulti() { gotoxy(5,7); cout<<"======================================================================"; gotoxy(10,8); cout<<"EMP NO:"; gotoxy(30,8); cout<<emp_id; gotoxy(40,8); cout<<"NAME OF EMP:"; gotoxy(60,8); cout<<ename; gotoxy(10,9); cout<<"ADDRESS:"; gotoxy(30,9); cout<<address; gotoxy(10,10); cout<<"PHONE NO.:"; gotoxy(30,10); cout<<phno; gotoxy(10,11); cout<<"DESIGNATION:"; gotoxy(25,11); cout<<desg; gotoxy(5,11); cout<<"====================================================================="; } void cust_input(int empid); }; void employee::cust_input(int empid) { char ch;
  • 9. gotoxy(5,7); cout<<"======================================================================"; gotoxy(10,8); cout<<"EMP NO:"; emp_id=empid; gotoxy(24,8); cout<<emp_id; gotoxy(35,8); cout<<"NAME OF EMP:"; gotoxy(54,8); cin>>ename; gotoxy(10,9); cout<<"ADDRESS:"; gotoxy(22,9); cin>>address; gotoxy(10,11); cout<<"PHONE NO.:"; gotoxy(25,11); cin>>phno; gotoxy(10,12); cout<<"DESIGNATION(M for manager,A for asst-manager,S for superwiser,W for worker:"; gotoxy(25,13); cin>>ch; switch(ch) { case 'M':strcpy(desg,"MANAGER"); break; case 'A':strcpy(desg,"ASST-MANAGER"); break; case 'S':strcpy(desg,"SUPERWISER"); break; default: strcpy(desg,"WORKER"); } gotoxy(5,15); cout<<"====================================================================="; } //*************************modify employee details void employee::modifycust_data(int n1,char nm[15],char add[15],char q[15]) { char tmpnm[40],tmpnm2[40],tmpnm3[15]; gotoxy(5,14); cout<<"===================WANT TO MODIFY ==============================="; gotoxy(10,15); cout<<"EMP NO:"; emp_id=n1; gotoxy(25,15); cout<<emp_id; gotoxy(40,15); strcpy(ename,nm); cout<<"NAME OF EMP:"; gotoxy(60,15); cout<<ename; gotoxy(10,17); cout<<"Want to change the name of employee"; gotoxy(50,17); int flag=0; while(1) { gets(tmpnm); if(strlen(tmpnm)!=0) { flag=1; break; } if(strlen(tmpnm)==0) { flag=0; break; } }
  • 10. if(flag==1) { strcpy(ename,tmpnm); } gotoxy(1,18); strcpy(address,add); //**************** NAME TO BE MODIFY cout<<"CUSTOMER ADDRESS:"; gotoxy(20,18); cout<<address; gotoxy(45,18); cout<<"Want to change the address"; gotoxy(10,19); flag=0; while(1) { gets(tmpnm2); if(strlen(tmpnm2)!=0) { flag=1; break; } if(strlen(tmpnm2)==0) { flag=0; break; } } if(flag==1) { strcpy(address,tmpnm2); } //*****************TO BE MODIFIED ENDS HERE gotoxy(5,20); strcpy(phno,q); //**************** phone no. TO BE MODIFY cout<<"EMPLOYEE PHONE NO.:"; gotoxy(20,20); cout<<phno; gotoxy(45,20); cout<<"Want to change the phone no."; gotoxy(70,21); flag=0; while(1) { gets(tmpnm3); if(strlen(tmpnm3)!=0) { flag=1; break; } if(strlen(tmpnm3)==0) { flag=0; break; } } if(flag==1) { strcpy(phno,tmpnm3); } char ch; gotoxy(5,22); cout<<"DESIGNATION(M for manager,A for asst-manager,S for superwiser,W for worker:"; gotoxy(25,23); cin>>ch; switch(ch) { case 'M':strcpy(desg,"MANAGER"); break; case 'A':strcpy(desg,"ASST-MANAGER"); break; case 'S':strcpy(desg,"SUPERWISER"); break; default:
  • 11. strcpy(desg,"WORKER"); } //*****************MODIFIED ENDS HERE gotoxy(5,24); cout<<"====================================================================="; } //**************************class function employee modify ends here //*********************employee class ends here********************* //****************function to add the records in a file void write_employee() { ofstream objoff; employee cobj; objoff.open("employee.dat",ios::out|ios::app); clrscr(); intromain(); int r=getemployees(); if(r>100) { r=1; } cobj.cust_input(r); objoff.write((char*)&cobj,sizeof(employee)); objoff.close(); gotoxy(10,20); cout<<"***************CUSTOMER RECORD SAVED******************* "; cin.ignore(); getch(); } //****************function to add the record in a file ends here //********************check the employee number already given or not****** int getemployees() { ifstream objiff; employee cust; int count=0; objiff.open("employee.dat",ios::binary); objiff.seekg(0,ios::beg); if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); } //**************temporary hiding these lines while(objiff.read((char *) &cust, sizeof(employee))) { count++; } //***********jump to the last line objiff.seekg(count-sizeof(cust),ios::beg); objiff.read((char *) &cust, sizeof(employee)); count=cust.getempid(); count++; objiff.close(); return count; } //***********************check the employee number ends here //*************************************************************** // function to read specific record from file //**************************************************************** void display_cust_sp(int n) { ifstream objfp; employee cust; int flag=0; objfp.open("employee.dat",ios::binary); if(!objfp) { cout<<"File could not be open !! Press any Key...";
  • 12. getch(); return; } while(objfp.read((char*)&cust,sizeof(employee))) { if(cust.getempid()==n) { clrscr(); intromain(); cust.show_cust(); flag=1; } } objfp.close(); if(flag==0) cout<<"nnrecord not exist"; getch(); } //**********************employee record sepecific******************************* //****************************************************************************** // DISPLAY ALL THE CUSTOMER TABULAR FORM //****************************************************************************** void cust_tabular() { int r=0,col=10; employee cust; ifstream inFile; inFile.open("employee.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } display_all_emp(); while(inFile.read((char *) &cust, sizeof(employee))) { if(r<=12) { r++; cust.showallcust(col); col++; }else { gotoxy(20,30); cout<<"--------------press any key------------------------"; getch(); clrscr(); display_all_emp(); col=10; r=0; } } inFile.close(); getch(); } //**************************tabular forms ends********************************** //function to display all the records of salary //********************************************************************** void display_all_emp() { clrscr(); intromain(); gotoxy(1,5); cout<<" **********************EMPLOYEES DETAILS***************************"; gotoxy(1,6); cout<<"================================================================================"; gotoxy(1,7);
  • 13. cout<<"CUST.NO"<<setw(10)<<"NAME"<<setw(15)<<"ADDRESS"<<setw(25)<<"PHONE NO"<<setw(15)<<"DESIGNATION"; gotoxy(1,8); cout<<"================================================================================"; } //*********************DISPLAY ALL ENDS HERE*************************** //************************************************************ // MODIFY employee RECORD //********************************************************** void modify_cust_record(int n) { employee cust,temp; char tmpnm[50],tmpaddress[50]; ifstream inFile; int fpos1=-1; inFile.open("employee.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } int flag=0; while(inFile.read((char *) &cust, sizeof(employee))) { if(cust.getempid()==n) { clrscr(); intromain(); cust.showempdatamulti(); flag=1; } } inFile.close(); if(flag==0) cout<<"nnrecord not exist"; else { //*******modifying the records starts here fstream File; File.open("employee.dat",ios::binary|ios::in|ios::out); if(!File) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(File.read((char *) &cust, sizeof(employee))) { if(cust.getempid()==n) { fpos1=(int)File.tellg(); break; } } File.seekp(fpos1-sizeof(employee),ios::beg); strcpy(tmpnm,cust.getempnm()); strcpy(tmpaddress,cust.getempadd()); char q1[15]; strcpy(q1,cust.getphno()); gotoxy(1,12); cout<<"*****************************************************************************"; gotoxy(1,13); cout<<"================ENTER NEW VALUES FOR THE RECORDS GIVEN ABOVE================="; temp.modifycust_data(n,tmpnm,tmpaddress,q1); File.write((char *) &temp, sizeof(employee)); File.close(); } } //***************************************************************************** //***************************************************************************** // DELETE THE RECORD OF THE employee AVAILABLE //****************************************************************************
  • 14. void deletecust_record(int n) { employee cust; ifstream inFile; inFile.open("employee.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } int flag=0; while(inFile.read((char *) &cust, sizeof(employee))) { if(cust.getempid()==n) { clrscr(); intromain(); cust.showempdatamulti(); flag=1; } } inFile.close(); char ch; if(flag==0) cout<<"nnrecord not exist"; else { //*******deletion of the records starts from here gotoxy(1,15); cout<<"*****************************************************************************"; gotoxy(5,16); cout<<"======DO YOU WANT TO DELETE THE RECORDS GIVEN ABOVE[YES(Y) OR NO (N)========"; gotoxy(2,17); cin>>ch; if (toupper(ch)=='Y') { ofstream outFile; outFile.open("Temp2.dat",ios::binary); ifstream objiff("employee.dat",ios::binary); objiff.seekg(0,ios::beg); while(objiff.read((char *) &cust, sizeof(employee))) { if(cust.getempid()!=n) { outFile.write((char *) &cust, sizeof(employee)); } } outFile.close(); objiff.close(); remove("employee.dat"); rename("Temp2.dat","employee.dat"); againopenandclosecust(); gotoxy(30,20); cout<<"----------------------------Record Deleted----------------------------------"; } } getch(); } //***********************delete record ends************************************ void againopenandclosecust() { ifstream inFile; employee cust; inFile.open("employee.dat",ios::binary); if(!inFile) { getch(); return; } while(inFile.read((char *) &cust, sizeof(employee)))
  • 15. { } inFile.close(); } //***********************search the employee*********************** int searchcust(int p) { employee cust; int tmprt=0; ifstream inFile; inFile.open("employee.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return -1; } int flag=0; while(inFile.read((char *) &cust, sizeof(employee))) { if(cust.getempid()==p) { clrscr(); intromain(); cust.showempdatamulti(); flag=1; tmprt=(int)inFile.tellg(); break; } } inFile.close(); if(flag==0) return 1; //cout<<"nnrecord not exist"; else { return tmprt; } } //*******************employee information ends********************* class salary { int salid; int eid; float basicsal; float hra,da,ta,pf; float netsal; public: salary() { basicsal=hra=da=ta=pf=netsal=0; } float getbasic() { return basicsal; } int getid() { return eid;} void modifydatasalary(int n1,int empid2,float bas,char dsg[15]); //***************************************************************************** void showdatamulti() { gotoxy(5,7); cout<<"======================================================================"; gotoxy(5,8); cout<<"SALARY NO:"; gotoxy(30,8); cout<<salid; gotoxy(45,8); cout<<"EMP ID:"; gotoxy(55,8); cout<<eid;
  • 16. gotoxy(5,9); cout<<"BASIC SALARY:"; gotoxy(27,9); cout<<basicsal; gotoxy(35,9); cout<<"HOUSE RENT ALLOWANCE: "; gotoxy(60,9); cout<<hra; gotoxy(5,10); cout<<"DEARNESS ALLOWANCE: "; gotoxy(27,10); cout<<da; gotoxy(35,10); cout<<"TRAVELLING ALLOWANCE:"; gotoxy(60,10); cout<<ta; gotoxy(5,11); cout<<"PROVIDENT FUND:"; gotoxy(22,11); cout<<pf; gotoxy(35,11); cout<<"NET SALARY:"; gotoxy(60,11); cout<<netsal; gotoxy(5,12); cout<<"====================================================================="; } //***************************************************************************** void create_sal(int rn1,char choice[15],int e) { //********************************************** gotoxy(5,7); cout<<"======================================================================"; gotoxy(5,8); cout<<"SALARY NO:"; salid=rn1; gotoxy(30,8); cout<<salid; eid=e; gotoxy(45,8); cout<<"EMP ID:"; gotoxy(55,8); cout<<eid; gotoxy(5,9); cout<<"BASIC SALARY:"; gotoxy(20,9); cin>>basicsal; //************************************************************************* gotoxy(15,10); cout<<"********MODIFY**HRA TA DA PF AND NET SALARY ***********"; if(strcmp(choice,"MANAGER")==0) { hra=(basicsal*30)/100; da=(basicsal*28)/100; ta=(basicsal*15)/100; pf=(basicsal*10)/100; netsal=(basicsal+hra+da+ta)-pf; }else if(strcmp(choice,"ASST-MANAGER")==0) { hra=(basicsal*28)/100; da=(basicsal*25)/100; ta=(basicsal*12)/100; pf=(basicsal*9)/100; netsal=(basicsal+hra+da+ta)-pf; }else if(strcmp(choice,"SUPERVISOR")==0) { hra=(basicsal*25)/100; da=(basicsal*22)/100; ta=(basicsal*10)/100; pf=(basicsal*8)/100;
  • 17. netsal=(basicsal+hra+da+ta)-pf; }else { hra=(basicsal*20)/100; da=(basicsal*18)/100; ta=(basicsal*8)/100; pf=(basicsal*7)/100; netsal=(basicsal+hra+da+ta)-pf; } gotoxy(5,11); cout<<"HOUSE RENT ALLOWANCE: "; gotoxy(28,11); cout<<hra; gotoxy(35,11); cout<<"DEARNESS ALLOWANCE: "; gotoxy(60,11); cout<<da; gotoxy(5,12); cout<<"TRAVELLING ALLOWANCE:"; gotoxy(30,12); cout<<ta; gotoxy(45,12); cout<<"PROVIDENT FUND:"; gotoxy(65,12); cout<<pf; gotoxy(5,13); cout<<"NET SALARY:"; //netsal=(basicsal+hra+ta+da)-pf; gotoxy(30,13); cout<<netsal; gotoxy(5,15); cout<<"====================================================================="; } void show_salary() { //******************************** gotoxy(5,7); cout<<"======================================================================"; gotoxy(5,8); cout<<"SALARY NO:"; gotoxy(30,8); cout<<salid; gotoxy(45,8); cout<<"EMP ID:"; gotoxy(55,8); cout<<eid; gotoxy(5,9); cout<<"--------------------------------------------------------------------"; gotoxy(5,10); cout<<"BASIC SALARY:"; gotoxy(30,10); cout<<basicsal; gotoxy(40,10); cout<<"HOUSE RENT ALLOWANCE: "; gotoxy(68,10); cout<<hra; gotoxy(5,11); cout<<"DEARNESS ALLOWANCE: "; gotoxy(30,11); cout<<da; gotoxy(40,11); cout<<"TRAVELLING ALLOWANCE:"; gotoxy(68,11); cout<<ta; gotoxy(5,12); cout<<"PROVIDENT FUND:"; gotoxy(30,12); cout<<pf; gotoxy(5,13); cout<<"--------------------------------------------------------------------";
  • 18. gotoxy(5,14); cout<<"NET SALARY:"; gotoxy(30,14); cout<<netsal; gotoxy(5,16); cout<<"====================================================================="; } //-----------------------show data tabular form---------------------- void showallsalary(int c) { gotoxy(1,c); cout<<salid<<setw(10)<<eid<<setw(10)<<basicsal<<setw(10)<<hra; cout<<setw(10)<<da<<setw(10)<<ta<<setw(10)<<pf<<setw(12)<<netsal; } //-----------------------ends here------------------------------------ int retsalid() {return salid;} }; //class ends here //*************************************************************** // global declaration for stream object, object //**************************************************************** //*************************modify salary void salary::modifydatasalary(int n1,int empid2,float bas,char dsg[15]) { float tmpbsal=0; gotoxy(5,14); cout<<"===================WANT TO MODIFY ==============================="; gotoxy(10,15); cout<<"SALARY NO:"; salid=n1; gotoxy(25,15); cout<<salid; gotoxy(40,15); cout<<"EMP ID:"; eid=empid2; gotoxy(50,15); cout<<eid; gotoxy(10,16); cout<<"BASIC SALARY"; gotoxy(30,16); basicsal=bas; cout<<basicsal; gotoxy(10,17); cout<<"Want to change the basic salary[0 for no]"; gotoxy(50,17); cin>>tmpbsal; if(tmpbsal!=0) { basicsal=tmpbsal; } gotoxy(5,18); cout<<"********MODIFY**HRA TA DA PF AND NET SALARY ***********"; if(strcmp(dsg,"MANAGER")==0) { hra=(basicsal*30)/100; da=(basicsal*28)/100; ta=(basicsal*15)/100; pf=(basicsal*10)/100; netsal=(basicsal+hra+da+ta)-pf; }else if(strcmp(dsg,"ASST-MANAGER")==0) { hra=(basicsal*28)/100; da=(basicsal*25)/100; ta=(basicsal*12)/100; pf=(basicsal*9)/100; netsal=(basicsal+hra+da+ta)-pf; }else if(strcmp(dsg,"SUPERVISOR")==0) { hra=(basicsal*25)/100;
  • 19. da=(basicsal*22)/100; ta=(basicsal*10)/100; pf=(basicsal*8)/100; netsal=(basicsal+hra+da+ta)-pf; }else { hra=(basicsal*20)/100; da=(basicsal*18)/100; ta=(basicsal*8)/100; pf=(basicsal*7)/100; netsal=(basicsal+hra+da+ta)-pf; } gotoxy(5,20); cout<<"HRA: "<<hra; gotoxy(20,20); cout<<"DA: "<<da; gotoxy(35,20); cout<<"TA: "<<ta; gotoxy(55,20); cout<<"PF: "<<pf; gotoxy(5,21); cout<<"-------------------------------------------------------------------"; gotoxy(25,22); cout<<"NET SALARY: "<<netsal; gotoxy(5,23); cout<<"-------------------------------------------------------------------"; gotoxy(5,25); cout<<"====================================================================="; } //**************************class function outside fstream fp; salary sal; //*************************************************************** // function to write in file //**************************************************************** void write_salary() {ifstream objiff("employee.dat",ios::binary); char str1[15]; employee eobj; int flag=0,eid; fp.open("salary.dat",ios::binary|ios::out|ios::app); clrscr(); intromain(); int rnn=getsalary(); if(rnn>100) { rnn=1; } cout<<"Enter the employee no:"; cin>>eid; while(objiff.read((char*)&eobj,sizeof(employee))) { if(eobj.getempid()==eid) { clrscr(); intromain(); eobj.show_cust(); strcpy(str1,eobj.getdesg()); flag=1; break; } } objiff.close(); if(flag==0) { cout<<"nnrecord not exist"; getch(); }else { if(flag==1)
  • 20. { clrscr(); intromain(); //***************************************** sal.create_sal(rnn,str1,eid); fp.write((char*)&sal,sizeof(salary)); gotoxy(10,20); cout<<"***************SALARY RECORD SAVED******************* "; } } cin.ignore(); fp.close(); getch(); } //********************check the salary number already given or not****** int getsalary() { ifstream objiff; salary st; int count=0; objiff.open("salary.dat",ios::binary); objiff.seekg(0,ios::beg); if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); } //**************temporary hiding these lines while(objiff.read((char *) &st, sizeof(salary))) { count++; } //***********jump to the last line objiff.seekg(count-sizeof(st),ios::beg); objiff.read((char *) &st, sizeof(salary)); count=st.retsalid(); count++; objiff.close(); return count; } //*************************************************************** // function to read specific record from file //**************************************************************** void display_sp_sal(int n) { int flag=0; fp.open("salary.dat",ios::in); if(!fp) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(fp.read((char*)&sal,sizeof(salary))) { if(sal.retsalid()==n) { clrscr(); intromain(); sal.show_salary(); flag=1; } } fp.close(); if(flag==0) cout<<"nnrecord not exist"; getch(); } //****************************************************************** // function before display salary report check the employee id
  • 21. //****************************************************************** int before_order() { int f=-1,num=0; employee cust; clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE EMP ID TO BE SEARCHED:"; gotoxy(55,9); cin>>num; ifstream inFile; inFile.open("employee.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return -1; } while(inFile.read((char *) &cust, sizeof(employee))) { if(cust.getempid()==num) { clrscr(); intromain(); cust.showempdatamulti(); f=1; break; } } inFile.close(); return f; } //*************************************************************** // INTRODUCTION FUNCTION //**************************************************************** void intro() { gotoxy(4,2); cout<<"***************************EMPLOYEES-MANAGEMENT*************************"; gotoxy(12,4); cout<<"==========================================================="; gotoxy(5,5); cout<<"****************************S=Y=S=T=E=M********************************"; gotoxy(50,10); cout<<"PROJECT:"; gotoxy(50,12); cout<<"MADE BY : TUSHAR"; gotoxy(10,14); cout<<"---------------SCHOOL : DOON PUBLIC SCHOOL--------------------"; getch(); } //*************************************************************** // ADMINSTRATOR MENU1 FUNCTION //**************************************************************** void admin_menu1() { clrscr(); char ch2; int num; clrscr(); intromain(); gotoxy(20,6); cout<<"=================ADMIN MENU===================="; gotoxy(22,7); cout<<"1.CREATE EMPLOYEE DETAILS"; gotoxy(22,8); cout<<"2.DISPLAY ALL EMPLOYEE'S DETAILS"; gotoxy(22,9); cout<<"3.SEARCH RECORD(QUERY) "; gotoxy(22,10);
  • 22. cout<<"4.MODIFY EMPLOYEE RECORDS"; gotoxy(22,11); cout<<"5.DELETE EMPLOYEE RECORDS"; gotoxy(22,12); cout<<"6.BACK TO MAIN MENU"; gotoxy(18,13); cout<<"Please Enter Your Choice (1-6) "; gotoxy(55,13); //********************************************************** ch2=getche(); switch(ch2) { case '1': clrscr(); write_employee(); break; case '2': cust_tabular(); break; case '3': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE EMP ID TO BE SEARCHED:"; gotoxy(55,9); cin>>num; display_cust_sp(num); break; case '4': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE EMP ID TO BE SEARCHED AND MODIFY:"; gotoxy(55,9); cin>>num; modify_cust_record(num); break; case '5': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE EMP ID TO BE SEARCHED AND TO DELETE:"; gotoxy(55,9); cin>>num; deletecust_record(num); break; case '6': break; default:cout<<"a";admin_menu1(); } } //***********************MENU 1 CUSTOMERS ENDS HERE************************* //*************************************************************** // ADMINSTRATOR MENU2 FUNCTION //**************************************************************** void admin_menu() { clrscr(); char ch2; int num; //************************************************************ clrscr(); intromain(); gotoxy(20,6); cout<<"=================ADMIN MENU===================="; gotoxy(22,7); cout<<"1.CREATE SALARY DATA OF EMPLOYEE"; gotoxy(22,8); cout<<"2.DISPLAY ALL SALARY REPORT'S AVAILABEL"; gotoxy(22,9); cout<<"3.SEARCH AND DISPLAY SALARY RECORD(QUERY) "; gotoxy(22,10); cout<<"4.MODIFY SALARY INFORMATION";
  • 23. gotoxy(22,11); cout<<"5.DELETE SALARY INFORMATION"; gotoxy(22,12); cout<<"6.BACK TO MAIN MENU"; gotoxy(18,13); cout<<"Please Enter Your Choice (1-6) "; gotoxy(55,13); //********************************************************** ch2=getche(); switch(ch2) { case '1': clrscr(); write_salary(); break; case '2': salary_tabular(); break; case '3': //******************** clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE SALARY ID TO BE SEARCHED:"; gotoxy(55,9); cin>>num; display_sp_sal(num); break; case '4': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE SALARY ID TO BE SEARCHED AND MODIFY:"; gotoxy(55,9); cin>>num; modify_recordsalary(num); break; case '5': clrscr(); intromain(); gotoxy(10,8); cout<<"*****ENTER THE SALARY ID TO BE SEARCHED AND TO DELETE:"; gotoxy(55,9); cin>>num; delete_recordsalary(num); break; case '6': break; default:cout<<"a";admin_menu(); } } //*************************************************************** // THE MAIN FUNCTION OF PROGRAM //**************************************************************** void main() { char ch; int n=0; intro(); do { //****************TEMPORARY*********************** clrscr(); intromain(); gotoxy(20,6); cout<<"=================MAIN MENU===================="; gotoxy(28,7); cout<<"01. SALARY REPORT GENERATOR"; gotoxy(28,8); cout<<"02. ADMINISTRATOR"; gotoxy(28,9); cout<<"03. EXIT"; gotoxy(20,10); cout<<"=============================================="; gotoxy(25,12); cout<<"Please Select Your Option (1-3) "; gotoxy(30,14); ch=getche(); switch(ch) { case '1':
  • 24. clrscr(); intromain(); gotoxy(10,8);cout<<"*****ENTER THE EMP ID TO BE SEARCHED:"; gotoxy(55,9);cin>>n; printreportsalary(n); getch(); break; case '2': middleadminmenu(); break; case '3':exit(0); default :cout<<"a"; } }while(ch!='3'); } //***************main intro void intromain() { clrscr(); gotoxy(1,2); cout<<"**********EMPLOYEE******MANAGEMENT****SYSTEM******PROJECT**********************"; gotoxy(1,3); cout<<"******************************************************************************"; } //****************************************************************************** // DISPLAY ALL THE PRODUCT TABULAR FORM //****************************************************************************** void salary_tabular() { int r=0,col=10; salary st; ifstream inFile; inFile.open("salary.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } display_all(); while(inFile.read((char *) &st, sizeof(salary))) { if(r<=12) { r++; st.showallsalary(col); col++; }else { gotoxy(20,30); cout<<"--------------press any key------------------------"; getch(); clrscr(); display_all(); col=10; r=0; } } inFile.close(); getch(); } //**************************tabular forms ends********************************** //*******************tabulars forms headings************************************ //function to display all the records of salary //********************************************************************** void display_all() { clrscr(); intromain(); gotoxy(1,5); cout<<" **********************EMPLOYEE'S SALARY'S DETAILS*************************"; gotoxy(1,6);
  • 25. cout<<"================================================================================"; gotoxy(1,7); cout<<"SALNO"<<setw(10)<<"EMP NO"<<setw(10)<<"BASICSAL"<<setw(10)<<"HRA"<<setw(10)<<"DA"<<setw(10)<<" TA "<<setw(10)<<" PF "<<setw(12)<<"NET SAL"; gotoxy(1,8); cout<<"================================================================================"; } //************************************************************ // MODIFY RECORD //********************************************************** void modify_recordsalary(int n) { salary st,temp; ifstream inFile; int fpos=-1; inFile.open("salary.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } int flag=0; while(inFile.read((char *) &st, sizeof(salary))) { if(st.retsalid()==n) { clrscr(); intromain(); st.showdatamulti(); flag=1; } } inFile.close(); if(flag==0) cout<<"nnrecord not exist"; else { //*******modifying the records starts here fstream File; File.open("salary.dat",ios::binary|ios::in|ios::out); if(!File) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(File.read((char *) &st, sizeof(salary))) { if(st.retsalid()==n) { fpos=(int)File.tellg(); break; } } File.seekp(fpos-sizeof(salary),ios::beg); ifstream objemp("employee.dat",ios::binary); employee ee; float bassic=st.getbasic(); int empid; empid=st.getid(); //int fpos2=0; char ds[35]; //****************search the employee record *************** while(objemp) { objemp.read((char*)&ee,sizeof(ee)); if(ee.getempid()==empid) { //fpos2=(int)File.tellg(); break; }
  • 26. } //objemp.seekg(fpos2-sizeof(employee),ios::beg); strcpy(ds,ee.getdesg()); objemp.close(); //********************************************************* gotoxy(1,12); cout<<"*****************************************************************************"; gotoxy(1,13); cout<<"================ENTER NEW VALUES FOR THE RECORDS GIVEN ABOVE================="; temp.modifydatasalary(n,empid,bassic,ds); File.write((char *) &temp, sizeof(salary)); File.close(); } } //***************************************************************************** // DELETE THE RECORD OF THE PRODUCTC NOT AVAILABLE //**************************************************************************** void delete_recordsalary(int n) { salary st; ifstream inFile; inFile.open("salary.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } int flag=0; while(inFile.read((char *) &st, sizeof(salary))) { if(st.retsalid()==n) { clrscr(); intromain(); st.showdatamulti(); flag=1; } } inFile.close(); char ch; if(flag==0) cout<<"nnrecord not exist"; else { //*******deletion of the records starts from here gotoxy(1,15); cout<<"*****************************************************************************"; gotoxy(5,16); cout<<"======DO YOU WANT TO DELETE THE RECORDS GIVEN ABOVE[YES(Y) OR NO (N)========"; gotoxy(2,17); cin>>ch; if (toupper(ch)=='Y') { ofstream outFile; outFile.open("Temp1.dat",ios::binary); ifstream objiff("salary.dat",ios::binary); objiff.seekg(0,ios::beg); while(objiff.read((char *) &st, sizeof(salary))) { if(st.retsalid()!=n) { outFile.write((char *) &st, sizeof(salary)); } } outFile.close(); objiff.close(); remove("salary.dat"); rename("Temp1.dat","salary.dat"); againopenandclose(); gotoxy(30,20); cout<<"----------------------------Record Deleted----------------------------------"; } } getch(); } //***********************delete record ends************************************ void againopenandclose() {
  • 27. ifstream inFile; salary st; inFile.open("salary.dat",ios::binary); if(!inFile) { getch(); return; } while(inFile.read((char *) &st, sizeof(salary))) { } inFile.close(); } //***********************search the salary*********************** int search(int p) { salary st; int tmprt=0; ifstream inFile; inFile.open("salary.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return -1; } int flag=0; while(inFile.read((char *) &st, sizeof(salary))) { if(st.retsalid()==p) { clrscr(); intromain(); st.showdatamulti(); flag=1; tmprt=(int)inFile.tellg(); break; } } inFile.close(); if(flag==0) return 1; //cout<<"nnrecord not exist"; else { return tmprt; } } void middleadminmenu() { char ch; do { //****************TEMPORARY*********************** clrscr(); intromain(); gotoxy(20,6); cout<<"===========EMPLOYEE'S-SALARY'S MENU==========="; gotoxy(28,7); cout<<"01. EMPLOYEE'S MENU"; gotoxy(28,8); cout<<"02. SALARY'S MENU"; gotoxy(28,9); cout<<"03. BACK TO MAIN"; gotoxy(20,10); cout<<"=============================================="; gotoxy(25,12); cout<<"Please Select Your Option (1-3) "; gotoxy(30,14); ch=getche(); switch(ch) { case '1': admin_menu1(); break; case '2': admin_menu(); break; case '3': break; default :cout<<"a";admin_menu(); } }while(ch!='3'); }
  • 28. //******************print the report of salary of employees void printreportsalary(int empno) { ifstream objiff("employee.dat",ios::binary); employee empobj; int flag=0; if(!objiff) { cout<<"File could not be open !! Press any Key..."; getch(); return; } clrscr(); while(objiff.read((char *) &empobj, sizeof(employee))) { if(empobj.getempid()==empno) { clrscr(); intromain(); empobj.showempreport(); flag=1; break; } } int id=empobj.getempid(); objiff.close(); if(flag==0) cout<<"nnrecord not exist"; else { ifstream objsal("salary.dat",ios::binary); salary salobj; gotoxy(1,11); cout<<"SALNO"<<setw(10)<<"EMP NO"<<setw(10)<<"BASICSAL"<<setw(10)<<"HRA"<<setw(10)<<"DA"<<setw(10)<<" TA "<<setw(10)<<" PF "<<setw(12)<<"NET SAL"; gotoxy(1,12); cout<<"================================================================================"; int cno=13; int r=0; if(!objsal) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(objsal.read((char *) &salobj, sizeof(salary))) { if(salobj.getid()==id) { salobj.showallsalary(cno); cno++; if(r<=15) { r++; }else { gotoxy(20,30); cout<<"--------------press any key------------------------"; getch(); clrscr(); display_all(); cno=10; r=0; } } } objsal.close(); } }//*************************************************************** // END OF PROJECT //***************************************************************
  • 29.
  • 30. if choice is: 2 if choice is: 1
  • 31. if choice is 2: salary details
  • 32.
  • 33. REQUIREMENTS HARDWARE REQUIRED • Printer, to print the required documents of the project • Compact Drive • Processor : intel • Ram : 512 MB or more than 512MB • Harddisk : 80 GB or more than 80GB. SOFTWARE REQUIRED • Operating system : Windows XP • Turbo C++, for execution of program and Ms word, for presentation of output.
  • 34. ADVANTAGES • An employee does not need to worry about their salary details. • This software reduces paper work. • It is easy to handle Employee’s record. • This software saves the time. • Information of the employees stores permanently. • Employee can also get the details of their salary yearly or monthly. DISADVANTAGES • This system suitable for only small organization. • Online facility is not available.
  • 35. CONCLUSION This software is efficient in maintaining employee’s details and can easily perform operations on salary of the employees. This software also reduces the work load of the department which works on maintaining the records of the employees. In future, this system can launch web site for easy online data entry.
  • 36. SYSTEM DESIGN Then we began with the design phase of the system. System design is a solution, a “HOW TO” approach to the creation of a new system. It translates system requirements into ways by which they can be made operational. It is a translational from a user oriented document to a document oriented programmers. For that, it provides the understanding and procedural details necessary for the implementation. Here we use Flowchart to supplement the working of the new system. The system thus made should be reliable, durable and above all should have least possible maintenance costs. It should overcome all the drawbacks of the Old existing system and most important of all meet the user requirements. START 1-employees salary reports 2-Administrator 3- Exit IF CHOICE =1 IF CHOICE =2 IF CHOICE =3 THEN STOP Display the salary report of the eemployee Add/modify/delete/search of the employees and the salary of the employees QUIT
  翻译: