2. This program is very useful in real life situation for
providing instant information of Employees working
under any company, department. It also stores the
information about employees monthly salary, employee
id and designation.
In this c++ program we can modify , add, delete, recall
and list the records.
Being OOP concept available, we can add or remove
function anytime we need and even add classes and
derived classes for further improvement of the program
Without recording.
2
3. SERIAL CONTENTS PAGE NUMBER
NUMBER
1. CERTIFICATE. 4
2. EMPLOYEE DATABASE 5 – 19
MANAGEMENT
SYSTEM PROGRAME.
3. OUTPUT OF THE 20
PROGRAME.
4. BIBLIOGRAPHY. 21
5. THANKS PAGE. 22
3
4. This is to certify that Rahul Tripathi and Utkarsh Srivastva
of class XII has successfully completed this computer
project on the topic “Employee Database Management
System” prescribed by Mr. A.K Shukla Sir, during
academic session 2012-2013 as per the guidelines issues
by Central Board of Secondary Education.
Mr. A.K Shukla External Examiner
(P.G.T, computer)
4
13. p.day=d.day;
p.month=d.month;
p.year=d.year;
cout<<"Make shure that no employee has the
same code"<<endl;
do
{
cout<<endl<<"Enter employee code, name, age &
salary
:"<<endl<<endl;
cout<<"OR"<<endl<<endl;
cout<<"To return to the Main menu press'm' key
else press'a':";
cin>>ch;
if(ch=='m'||ch=='M')
{
main();
14. }
cin>>p.empcode>>p.name>>p.age>>p.sal;
p.flag=' ';
file.write((char*)&p,sizeof(p));
cout<<"Add another record ?(y/n) :";
cin>>ch;
}
while(ch=='y'||ch=='Y');
}
void group::listrec()
{
int j=0,a;
file.seekg(0L,ios::beg);
cout<<"List of records present are as
under>>>"<<endl<<endl;
15. cout<<" "<<"|CODE|"<<"
"<<"|NAME|"<<"
"<<"|AGE|"<<" "<<"|SALARY|"<<" "<<"|DATED|"<<endl;
//Donot touch Above Line Any Way it is set to
give Some Nice Look
while(file.read((char*)&p,sizeof(p)))
{
if(p.flag!='*')
cout<<endl<<"Record#"<<"
"<<j++<<setw(6)<<p.empcode<<setw(20)<<p.name<<set
w(4)<<p.age<<setw(9)<<p.sal<<"
"<<p.day<<"/"<<p.month<<"/"<<p.year<<endl;
}
file.clear();
if(j==0)
{
19. cout<<"Enter employee code to be deleted :";
cin>>code;
file.seekg(0L,ios::beg);
while(file.read((char*)&p,sizeof(p)))
{
if (strcmp(p.empcode,code)==0)
{
p.flag='*';
pos=count*sizeof(p);
file.seekp(pos,ios::beg);
file.write((char*)&p,sizeof(p));
return;
}
count++;
}
cout<<endl<<"No employee in file with
code="<<code;
20. cout<<endl<<"Press any key...";
getch();
file.clear();
}
void group::recallrec()
{
char code[5];
long int pos;
int count=0;
cout<<"Enter employee code to be recalled :";
cin>>code;
file.seekg(0L,ios::beg);
while(file.read((char*)&p,sizeof(p)))
{
21. if(strcmp(p.empcode,code)==0)
{
p.flag=' ';
pos=count*sizeof(p);
file.seekp(pos,ios::beg);
file.write((char*)&p,sizeof(p));
return;
}
count++;
}
cout<<endl<<"No employee in the file with
code="<<code;
cout<<endl<<"Press any key...";
getch();
file.clear();
}
23. gotoxy(10,10);
cout<<"Marked records to be deleted are all removed";
gotoxy(10,11);
cout<<"press any key....";
getch();
}
void group::exit()
{
file.close();
}
24. Todays date : 2/01/2013
Srknec.corporation pvt.ltd
1. Add record
2. List record
3. Modify record
4. Delete record
5. Recall record
6. Pack record
0. Exit your choice
20
25. To make this project we have taken source from a book
“Computer Science With C++” written by Sumita Arora
and “let us c++” written by Yashwanth Kanethkar.
And taken help of our computer teacher Mr. A.K Shukla
sir.
21
26. We would like to thank our computer sir Mr. A.K Shukla,
who provided us this opportunity to make a project on
“Employee Database Management System” which really
helped us to understand the concepts of C++ computer
programming.
22