SlideShare a Scribd company logo
Computer science project work
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
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
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
#include<fstream.h>
#include<dos.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<iomanip.h>
#include<graphics.h>


    class group
    {
    private:
        struct person
{
     char flag;
     char empcode[5];
     char name[40];
     int age;
     float sal;
     int day;
     int month;
     int year;
     }p;
     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<<d.year;
    gotoxy(12,9);
cout<<"Srknec.corporation pvt.ltd";
gotoxy(12,12);
cout<<"1.Add record";
gotoxy(12,15);
cout<<"2.List Record";
gotoxy(12,17);
cout<<"3.Modify record";
gotoxy(12,19);
cout<<"4.Delete record";
gotoxy(12,21);
cout<<"5.Recall record";
gotoxy(12,23);
cout<<"6.Pack record";
gotoxy(12,25);
cout<<"0.Exit";
gotoxy(12,28);
cout<<"Your choice"<<" ";
cin>>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'5':
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<<endl<<"Unable to open file";
    exit();
    }


}
    void group::addrec()
{
    char ch;
    file.seekp(0L,ios::end);
struct dosdate_t d;
_dos_getdate(&d);
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();
}
    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;
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)
{
gotoxy(10,10);
cout<<"No record exit";
gotoxy(10,11);
cout<<"Press any key...";
getch();
}
else
{
cout<<endl<<"Press any key...";
getch();
}
}
void group::modirec()
{
char code[5];
int count=0;
long int pos;
cout<<"Enter employee code whose record is to be
modified :";
cin>>code;
file.seekg(0L,ios::beg);
while(file.read((char*)&p,sizeof(p)))
{
if(strcmp(p.empcode,code)==0)
{
cout<<endl<<"Enter new record "<<endl;
 cout<<endl<<"Enter employee name,age & salary
:"<<endl;
cin>>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<<endl<<"No employee in file with code= "<<code;
getch();
file.clear();
}
void group::delrec()
     {
     char code[5];
     long int pos;
     int count=0;
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;
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)))
     {
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();
          }
void group::packrec()
         {
          ofstream outfile;
    outfile.open("TEMP",ios::out);
    file.seekg(0,ios::beg);
    while(file.read((char*)&p,sizeof(p)))
    {
     if(p.flag!='*')
     outfile.write((char*)&p,sizeof(p));
     }
     outfile.close();
     file.close();
     remove("Emp.DAT");
     rename("TEMP","EMP.DAT");


file.open("EMP.DAT",ios::binary|ios::in|ios::out|ios::nocr
eate);
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();
}
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
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
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
Computer science project work
Ad

More Related Content

What's hot (20)

computer science project for class 12 on telephone billing
computer science project for class 12 on telephone billingcomputer science project for class 12 on telephone billing
computer science project for class 12 on telephone billing
anshi acharya
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
RithuJ
 
Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM)
Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM)Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM)
Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM)
अयशकांत मिश्र
 
Report Card making BY Mitul Patel
Report Card making BY Mitul PatelReport Card making BY Mitul Patel
Report Card making BY Mitul Patel
Mitul Patel
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSE
Sylvester Correya
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
Harsh Kumar
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
ArkaSarkar23
 
Computer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementComputer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school management
RemaDeosiSundi
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEm
home
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQL
Darshit Vaghasiya
 
class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In Python
AbhishekKumarMorla
 
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
HIMANSHU .
 
Ip project
Ip projectIp project
Ip project
Jasmeet Singh
 
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
 
Library management
Library managementLibrary management
Library management
Vishnu Prasad
 
IP project for class 12 cbse
IP project for class 12 cbseIP project for class 12 cbse
IP project for class 12 cbse
siddharthjha34
 
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
 
Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12
OmRanjan2
 
C++ project on police station software
C++ project on police station softwareC++ project on police station software
C++ project on police station software
dharmenderlodhi021
 
PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEM
vikram mahendra
 
computer science project for class 12 on telephone billing
computer science project for class 12 on telephone billingcomputer science project for class 12 on telephone billing
computer science project for class 12 on telephone billing
anshi acharya
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
RithuJ
 
Report Card making BY Mitul Patel
Report Card making BY Mitul PatelReport Card making BY Mitul Patel
Report Card making BY Mitul Patel
Mitul Patel
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSE
Sylvester Correya
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
Harsh Kumar
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
ArkaSarkar23
 
Computer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementComputer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school management
RemaDeosiSundi
 
Student DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEmStudent DATABASE MANAGeMEnT SysTEm
Student DATABASE MANAGeMEnT SysTEm
home
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQL
Darshit Vaghasiya
 
class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In Python
AbhishekKumarMorla
 
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
HIMANSHU .
 
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
 
IP project for class 12 cbse
IP project for class 12 cbseIP project for class 12 cbse
IP project for class 12 cbse
siddharthjha34
 
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
 
Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12
OmRanjan2
 
C++ project on police station software
C++ project on police station softwareC++ project on police station software
C++ project on police station software
dharmenderlodhi021
 
PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEM
vikram mahendra
 

Viewers also liked (20)

Project report
Project reportProject report
Project report
meenalpandey
 
MOVIE TICKET BOOKING-COMPUTER SCIENCE C++ PROJECT
MOVIE TICKET BOOKING-COMPUTER SCIENCE C++ PROJECTMOVIE TICKET BOOKING-COMPUTER SCIENCE C++ PROJECT
MOVIE TICKET BOOKING-COMPUTER SCIENCE C++ PROJECT
Sindhu Ashok
 
c++ report file for theatre management project
c++ report file for theatre management projectc++ report file for theatre management project
c++ report file for theatre management project
Rajesh Gangireddy
 
School Management (c++)
School Management (c++) School Management (c++)
School Management (c++)
Nirdhishwar Nirdhi
 
c++ project on restaurant billing
c++ project on restaurant billing c++ project on restaurant billing
c++ project on restaurant billing
Swakriti Rathore
 
Hotel Management system in C++
Hotel Management system in C++ Hotel Management system in C++
Hotel Management system in C++
Prince Kumar
 
C++ Project
C++ ProjectC++ Project
C++ Project
srinu2792
 
High performance web programming with C++14
High performance web programming with C++14High performance web programming with C++14
High performance web programming with C++14
Matthieu Garrigues
 
Reema Agarwal , BCA Third Year
Reema Agarwal , BCA Third YearReema Agarwal , BCA Third Year
Reema Agarwal , BCA Third Year
Dezyneecole
 
Ravi Prakash Yadav , BCA Third Year
Ravi Prakash Yadav , BCA Third YearRavi Prakash Yadav , BCA Third Year
Ravi Prakash Yadav , BCA Third Year
Dezyneecole
 
Binary studio academy 2013 c++ group (andrey and max)
Binary studio academy 2013 c++ group (andrey and max)Binary studio academy 2013 c++ group (andrey and max)
Binary studio academy 2013 c++ group (andrey and max)
Binary Studio
 
Rakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearRakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third Year
Dezyneecole
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
vikram mahendra
 
Railway reservation(c++ project)
Railway reservation(c++ project)Railway reservation(c++ project)
Railway reservation(c++ project)
Debashis Rath
 
Bank Management System
Bank Management SystemBank Management System
Bank Management System
Vinoth Ratnam Sudalaimuthu
 
documentation on bank management system
documentation on bank management systemdocumentation on bank management system
documentation on bank management system
Unsa Jawaid
 
Acknowledgement
AcknowledgementAcknowledgement
Acknowledgement
Utkarsh0825
 
Employee Management System Project Propsal
Employee Management System Project Propsal Employee Management System Project Propsal
Employee Management System Project Propsal
Syed Junaid
 
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Vidhi Kishor
 
Online railway reservation system
Online railway reservation systemOnline railway reservation system
Online railway reservation system
PIYUSH Dubey
 
MOVIE TICKET BOOKING-COMPUTER SCIENCE C++ PROJECT
MOVIE TICKET BOOKING-COMPUTER SCIENCE C++ PROJECTMOVIE TICKET BOOKING-COMPUTER SCIENCE C++ PROJECT
MOVIE TICKET BOOKING-COMPUTER SCIENCE C++ PROJECT
Sindhu Ashok
 
c++ report file for theatre management project
c++ report file for theatre management projectc++ report file for theatre management project
c++ report file for theatre management project
Rajesh Gangireddy
 
c++ project on restaurant billing
c++ project on restaurant billing c++ project on restaurant billing
c++ project on restaurant billing
Swakriti Rathore
 
Hotel Management system in C++
Hotel Management system in C++ Hotel Management system in C++
Hotel Management system in C++
Prince Kumar
 
High performance web programming with C++14
High performance web programming with C++14High performance web programming with C++14
High performance web programming with C++14
Matthieu Garrigues
 
Reema Agarwal , BCA Third Year
Reema Agarwal , BCA Third YearReema Agarwal , BCA Third Year
Reema Agarwal , BCA Third Year
Dezyneecole
 
Ravi Prakash Yadav , BCA Third Year
Ravi Prakash Yadav , BCA Third YearRavi Prakash Yadav , BCA Third Year
Ravi Prakash Yadav , BCA Third Year
Dezyneecole
 
Binary studio academy 2013 c++ group (andrey and max)
Binary studio academy 2013 c++ group (andrey and max)Binary studio academy 2013 c++ group (andrey and max)
Binary studio academy 2013 c++ group (andrey and max)
Binary Studio
 
Rakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearRakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third Year
Dezyneecole
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
vikram mahendra
 
Railway reservation(c++ project)
Railway reservation(c++ project)Railway reservation(c++ project)
Railway reservation(c++ project)
Debashis Rath
 
documentation on bank management system
documentation on bank management systemdocumentation on bank management system
documentation on bank management system
Unsa Jawaid
 
Employee Management System Project Propsal
Employee Management System Project Propsal Employee Management System Project Propsal
Employee Management System Project Propsal
Syed Junaid
 
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Vidhi Kishor
 
Online railway reservation system
Online railway reservation systemOnline railway reservation system
Online railway reservation system
PIYUSH Dubey
 
Ad

Similar to Computer science project work (20)

computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)
Nitish Yadav
 
Employee management system
Employee management systemEmployee management system
Employee management system
Deepák Soni
 
Classes(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docxClasses(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docx
brownliecarmella
 
project3
project3project3
project3
Russell Rawls
 
The purpose of this C++ programming project is to allow the student .pdf
The purpose of this C++ programming project is to allow the student .pdfThe purpose of this C++ programming project is to allow the student .pdf
The purpose of this C++ programming project is to allow the student .pdf
Rahul04August
 
SALARY MANAGEMENT SYSTEM IN C++
SALARY MANAGEMENT SYSTEM IN C++SALARY MANAGEMENT SYSTEM IN C++
SALARY MANAGEMENT SYSTEM IN C++
vikram mahendra
 
I am trying to change this code from STRUCTS to CLASSES, the members.pdf
I am trying to change this code from STRUCTS to CLASSES, the members.pdfI am trying to change this code from STRUCTS to CLASSES, the members.pdf
I am trying to change this code from STRUCTS to CLASSES, the members.pdf
petercoiffeur18
 
Employee Management System in C++
Employee Management System in C++Employee Management System in C++
Employee Management System in C++
Jayant Gope
 
Open a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdfOpen a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdf
lonkarhrishikesh
 
Sunil
SunilSunil
Sunil
sunilkumawat63
 
lab 6.docxThe emphasis in this lab is the use of struc.docx
lab 6.docxThe emphasis in this lab is the use of struc.docxlab 6.docxThe emphasis in this lab is the use of struc.docx
lab 6.docxThe emphasis in this lab is the use of struc.docx
smile790243
 
OOPS 22-23 (1).pptx
OOPS 22-23 (1).pptxOOPS 22-23 (1).pptx
OOPS 22-23 (1).pptx
SushmaGavaraskar
 
#include iostream #include fstream #include string #incl.pdf
#include iostream #include fstream #include string #incl.pdf#include iostream #include fstream #include string #incl.pdf
#include iostream #include fstream #include string #incl.pdf
aptexx
 
Write a task that will perform some of the functions performed by a s.docx
 Write a task that will perform some of the functions performed by a s.docx Write a task that will perform some of the functions performed by a s.docx
Write a task that will perform some of the functions performed by a s.docx
ajoy21
 
Open a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdfOpen a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdf
Nathan2rSPeakes
 
Having issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfHaving issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdf
rajkumarm401
 
in C++ Design a class named Employee The class should keep .pdf
in C++ Design a class named Employee The class should keep .pdfin C++ Design a class named Employee The class should keep .pdf
in C++ Design a class named Employee The class should keep .pdf
adithyaups
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical file
Mitul Patel
 
To write a program that implements the following C++ concepts 1. Dat.pdf
To write a program that implements the following C++ concepts 1. Dat.pdfTo write a program that implements the following C++ concepts 1. Dat.pdf
To write a program that implements the following C++ concepts 1. Dat.pdf
SANDEEPARIHANT
 
Tasks In this assignment you are required to design and imp.pdf
Tasks In this assignment you are required to design and imp.pdfTasks In this assignment you are required to design and imp.pdf
Tasks In this assignment you are required to design and imp.pdf
acsmadurai
 
computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)
Nitish Yadav
 
Employee management system
Employee management systemEmployee management system
Employee management system
Deepák Soni
 
Classes(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docxClasses(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docx
brownliecarmella
 
The purpose of this C++ programming project is to allow the student .pdf
The purpose of this C++ programming project is to allow the student .pdfThe purpose of this C++ programming project is to allow the student .pdf
The purpose of this C++ programming project is to allow the student .pdf
Rahul04August
 
SALARY MANAGEMENT SYSTEM IN C++
SALARY MANAGEMENT SYSTEM IN C++SALARY MANAGEMENT SYSTEM IN C++
SALARY MANAGEMENT SYSTEM IN C++
vikram mahendra
 
I am trying to change this code from STRUCTS to CLASSES, the members.pdf
I am trying to change this code from STRUCTS to CLASSES, the members.pdfI am trying to change this code from STRUCTS to CLASSES, the members.pdf
I am trying to change this code from STRUCTS to CLASSES, the members.pdf
petercoiffeur18
 
Employee Management System in C++
Employee Management System in C++Employee Management System in C++
Employee Management System in C++
Jayant Gope
 
Open a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdfOpen a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdf
lonkarhrishikesh
 
lab 6.docxThe emphasis in this lab is the use of struc.docx
lab 6.docxThe emphasis in this lab is the use of struc.docxlab 6.docxThe emphasis in this lab is the use of struc.docx
lab 6.docxThe emphasis in this lab is the use of struc.docx
smile790243
 
#include iostream #include fstream #include string #incl.pdf
#include iostream #include fstream #include string #incl.pdf#include iostream #include fstream #include string #incl.pdf
#include iostream #include fstream #include string #incl.pdf
aptexx
 
Write a task that will perform some of the functions performed by a s.docx
 Write a task that will perform some of the functions performed by a s.docx Write a task that will perform some of the functions performed by a s.docx
Write a task that will perform some of the functions performed by a s.docx
ajoy21
 
Open a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdfOpen a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdf
Nathan2rSPeakes
 
Having issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfHaving issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdf
rajkumarm401
 
in C++ Design a class named Employee The class should keep .pdf
in C++ Design a class named Employee The class should keep .pdfin C++ Design a class named Employee The class should keep .pdf
in C++ Design a class named Employee The class should keep .pdf
adithyaups
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical file
Mitul Patel
 
To write a program that implements the following C++ concepts 1. Dat.pdf
To write a program that implements the following C++ concepts 1. Dat.pdfTo write a program that implements the following C++ concepts 1. Dat.pdf
To write a program that implements the following C++ concepts 1. Dat.pdf
SANDEEPARIHANT
 
Tasks In this assignment you are required to design and imp.pdf
Tasks In this assignment you are required to design and imp.pdfTasks In this assignment you are required to design and imp.pdf
Tasks In this assignment you are required to design and imp.pdf
acsmadurai
 
Ad

Computer science project work

  • 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
  • 6. { char flag; char empcode[5]; char name[40]; int age; float sal; int day; int month; int year; }p; fstream file; public: group(); void addrec(); void listrec(); void modirec();
  • 7. void delrec(); void recallrec(); void packrec(); void exit(); }; void main() { char choice,v; group g; do { clrscr(); struct dosdate_t d; _dos_getdate(&d);
  • 8. // 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<<d.year; gotoxy(12,9); cout<<"Srknec.corporation pvt.ltd"; gotoxy(12,12); cout<<"1.Add record"; gotoxy(12,15);
  • 9. cout<<"2.List Record"; gotoxy(12,17); cout<<"3.Modify record"; gotoxy(12,19); cout<<"4.Delete record"; gotoxy(12,21); cout<<"5.Recall record"; gotoxy(12,23); cout<<"6.Pack record"; gotoxy(12,25); cout<<"0.Exit"; gotoxy(12,28); cout<<"Your choice"<<" "; cin>>choice; clrscr(); switch(choice)
  • 12. void group::group() { file.open("Emp.dat",ios::binary|ios::in|ios::out); p.flag=' '; if(!file) { cout<<endl<<"Unable to open file"; exit(); } } void group::addrec() { char ch; file.seekp(0L,ios::end); struct dosdate_t d; _dos_getdate(&d);
  • 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) {
  • 16. gotoxy(10,10); cout<<"No record exit"; gotoxy(10,11); cout<<"Press any key..."; getch(); } else { cout<<endl<<"Press any key..."; getch(); } } void group::modirec() { char code[5]; int count=0; long int pos;
  • 17. cout<<"Enter employee code whose record is to be modified :"; cin>>code; file.seekg(0L,ios::beg); while(file.read((char*)&p,sizeof(p))) { if(strcmp(p.empcode,code)==0) { cout<<endl<<"Enter new record "<<endl; cout<<endl<<"Enter employee name,age & salary :"<<endl; cin>>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;
  • 18. 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; getch(); file.clear(); } void group::delrec() { char code[5]; long int pos; int count=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(); }
  • 22. void group::packrec() { ofstream outfile; outfile.open("TEMP",ios::out); file.seekg(0,ios::beg); while(file.read((char*)&p,sizeof(p))) { if(p.flag!='*') outfile.write((char*)&p,sizeof(p)); } outfile.close(); file.close(); remove("Emp.DAT"); rename("TEMP","EMP.DAT"); file.open("EMP.DAT",ios::binary|ios::in|ios::out|ios::nocr eate);
  • 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
  翻译: