ducational In=titution=
COMPUTER SCIENCE
PROJECT. WORK
ON
EMPLOYEE DATABASE V/ANAGEMENT-SYSTEM
SESSION 2012-2018
BY
RAHUL TRIPATHI AND UTKARSH SRIVASTAVA
CLASS. Xi
ROLL NUMBER- RAHUL--> 24 & UTKARSH--> 32
PO - VIDUTNAGAR,, PIN 224238INTRODUCTION TO THE PROJECT
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.INDEX
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. 22CERTIFICATE
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)En ae Mant en Pen
#include
Hinclude
#include
#include
#include
#include
#include
#include
class group
{
private:
struct person{
char flag;
char empcode[5];
char name[40];
int age;
float sal;
int day;
int month;
int year;
Ip;
fstream file;
public:
group();
void addrec();
void listrec();
void modirec();void delrec();
void recallrec();
void packrec();
void exit();
‘
void main()
{
char choice,v;
group g;
do
{
clrscr();
struct dosdate_t d;
_dos_getdate(&d);// p.day=d.day;
// p.month=d.month;
//_ p.year=d.year;
// _dos_getdate(&d);
gotoxy(12,5);
textcolor(6);
cprintf("Todays date:");
printf("%d",d.day);
cout<<"/";
printf("%d",d.month);
cout<<"/";
cout<>choice;
clrscr();
switch(choice){
case '1':
g.addrec();
break;
case'2':
g.listrec();
break;
case'3':
g.modirec();
break;
case'4':
g.delrec();
break;
case'S':g.recallrec();
break;
case'6':
g.packrec();
break;
case'0':
g.exit();
exit(1);
}
while(choice!=0);void group::group()
{
file.open("Emp.dat",ios::binary | ios::in| ios::out);
p.flag='';
if(!file)
{
cout<>ch;
if(ch=='m' | |ch=='M')
{
main();}
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=='V');
}
void group::listrec()
int j=0,a;
file.seekg(OL,ios::beg);
cout<<"List of records present are as
under>>>"<>code;
file.seekg(OL,ios::beg);
while(file.read((char*)&p,sizeof(p)))
{
if(strcmp(p.empcode,code)==0)
{
cout<>p.name>>p.age>>p.sal;
struct dosdate_t d;
_dos_getdate(&d);
p.day=d.day;
p.month=d.month;
p.year=d.year;p.flag="';
pos=count*sizeof(p);
file.seekp(pos, ios::beg);
file.write((char*)&p,sizeof(p));
return;
}
count++;
}
cout<>code;
file.seekg(OL,ios::beg);
while(file.read((char*)&p,sizeof(p)))
{
if (stremp(p.empcode,code)==0)
{
p.flag="*";
pos=count*sizeof(p);
file.seekp(pos,ios::beg);
file.write((char*) &p,sizeof(p));
return;
}
count++;
}
cout<>code;
file.seekg(OL,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<