0% found this document useful (0 votes)
14 views40 pages

Employee Management System Project

The document describes a student project on an employee management system. It outlines the objectives to computerize employee data storage and processing. It also details the hardware requirements, software tools used including C++, and includes the full source code for the system.

Uploaded by

dchandle3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views40 pages

Employee Management System Project

The document describes a student project on an employee management system. It outlines the objectives to computerize employee data storage and processing. It also details the hardware requirements, software tools used including C++, and includes the full source code for the system.

Uploaded by

dchandle3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

COMPUTER SCIENCE

INVESTIGATORY
PROJECT

Kendriya Vidyalaya
DIU
Submitted by:
ASIF
12th A
CERTIFICATE
This is hereby to certify that, the original and genuine investigation
work has been carried out to investigate about the subject matter
and the related data collection and investigation has been completed
solely, sincerely and satisfactorily by SHEIKH ASIF ALI of Class XII A,
Kendriya Vidyalaya DIU, regarding his project titled “EMPLOYEE
MANAGEMENT SYSTEM”.

Student’s Sign .Teacher’s Sign.


ACKNOWLEDGEMENT
It would be my utmost pleasure to express my sincere thanks to my
Computer Science Teacher Mr. RAHUL MAKWANA in providing a
helping hand in this project. Their valuable guidance, support and
supervision all through this project titled “EMPLOYEE
MANAGEMENT SYSTEM”, are responsible for attaining its present
form.

I would like to thank her for teaching us computer science from the
very basics thus strengthening our root and making us understand
complex chapters easily.

This project has been made not only for fetching marks but also for
knowledge.

SHEIKH ASIF ALI

XII A
CONTENTS
1. Introduction
2. System Objectives & Aim of the Project
3. Theory
4. Header Files Used
5. Source Code
6. Output Screens
7. Bibliography
INTRODUCTION
The purpose of the project is to computerize the requirement
of the EMPLOYEE MANAGEMENT SYSTEM and such to add
an employee, display the list of employees, search for an
employee, increase an employee’s salary, promotion for an
employee and delete an employee’s record. The
softwaresaves multiple employee records and gives option
for every kind of modification needed. It does almost every
work related to employee management purposesvia-

1) Add an employee
2) Display (All/Specific)
3) Salary Hike
4) Promotion
5) Deleting an employee record
SYSTEM OBJECTIVES&
AIM OF THE PROJECT
Employee Management System which starts with a manual data
entry and management deals with many operations, now-a-
days has become a complicated and error prone job to maintain
the company’s administrative system manually. So, we have
decided to go about computerizing their operation. The new system
created in the project i.e.

“Computerization of Employee ManagementSystem”


tends to computerize the Employee Management System by
storing its associated data in database files and thus performing all
works related to modification and implementation.

The main aim while implementing the project Employee


Management System were to minimize the work and at the same
time increase the speed of the work done. The new system is built
with the following objectives: -

•Information retrieval will become easy.


•Maintenance of database as well as overall project will become
easy.
•Modification to the database will become easy.
HARDWARE REQUIREMENT
PROCESSOR Pentium III 500 MHz

HARD DISK DRIVE 2GB


RAM 64 MB

CACHE 512 KB

TOOLS/PLATFORM, LANGUAGE
TO BE USED
Software and hardware specification as the name suggests,

tells us about the various characteristics of the software and

the hardware environment used i.e. the development

environment used. Here I specify various software languages,

supporting tools that have been used for the development of

the system. These tools and the languages have been used

because of their relative ease of understand and

personalinterest of the team developing the project.


SOFTWARE ENVIRONMENT
OF PROJECT

PLATFORM WINDOW 8,10

FRONT END IDE Turbo C++

BACK END DOS file support

SOFTWARE LANGUAGES USED

In the development of a project the selection of an

appropriate programming language and a platform is of

primary importance. The major part of credit of success of a

project goes to the software environment chosen by the

developer. Selecting a language from the ocean of the

languages is very difficult. A developer has to consider the

various features and functionalities that a particular language

can provide him/her how easily and successfully the


requirements of a user can be fulfilled depend on the s/w

language chosen. More over the developer also has to take

care of the various facilities, he can use. In the development

of this application, it has been taken into great consideration

that server overhead should be low as far as possible.

TURBO C++
It is one of the most widely used development tools on the

market today. C++ is a high-level, compilerandhigh

shelllanguage. In addition, C++ has the feature of object-

oriented programming.

A language can be classified as low-level language and high-

level language. Program written in the low-level language is

dependent on the architecture of the computer. In other

words, the low-level languages are machine dependent.


Machine language and Assembly language are the low-level

languages. High-level language uses English like statements

to give an instruction to the machine. These instructions are

machine independent. The same source program can be used

on another machine, which is architecturally different from

the machine in which the source program is written with a

few or no changes. In other words, the high-level languages

are machine independent. A high-level language has more

readability than low-level language. Programming in high-

level language is much easier than low-level language.


FEATURES OF C++

 It is a simple language that’s easy to master.

 C++ is a superset of C

 C++ makes working with the basic data types extremely

easy.
 C++ provides a full-featured development environment

with features such as polymorphism.

 The native code compiler provides the feature to build

fast, scalable components.

 Some facilities of C++ are inheritance, function

overloading, operator overloading.

 C++ allows creating hierarchy related objects.

 C++ programs are easy to maintain and are also

expandable.

 C++ program is a collection of function.

 It gives us the ability to get close to the machine-level

details.

 This language provides clarity, incorporating the spirit

and efficiency of C.

 It is based on object-oriented programming structure.


FILE HANDLING
We know that Files are used for Storing Permanent information. And
C++ provides a Facility to a developer the Retrieve the Information
from File and he may also modify the Contents of a File So that we
can say that File Handling is the Concept to Store, Retrieve and
Modify the Information which is stored in the Form of Files in your
Computer.

There are Many Built in Classes of C++, Which Provides Various


Functionality for Performing the Operations on Files. A user has an
Ability to Modify the data of a File With the help of these Functions.
Generally, a user can use a File Read, Write or For Appending More
data into the File so that C++ Provides Various Classes For Performing
these Operations. There are two most important Classes which are
known as ifstream and ofstream. Ifstream stands for input Stream
which is used for Reading the Contents from a File and output
Stream or Simply ofstream is used for writing data into the Files.

There is one More Class Which is used for Both Performing read
and write known as fstream class and Always Remember for using
Any Class First we have to use or include a header file which is called
as Fstream.h header file.

Various Functions for Reading and writing data of Files

1) get: - This Functions Stands for Reading data from a File in the
Form of Character.

2) Put:- This Function is used for Writing the data into a File in the
Form of Characters

3) << and >> These Operators are also used for Writing the data into
the File, The Data may int,float or any other data type. << Operator is
used for Writing data into a File and >> Operator is used for Reading
data from a File.

4) Read and Write: - With the help of C++ one can also Read or Write
the Data from a file. But C++ also Provides a Write Method or
Function for Writing the data of A Class into a File Like Data of a
Member Functions, Values of data Members of a Class and One Can
Also Read the Information once this written into a File with the help
of Read Method or Function.

HEADER FILES USED


1. #include<iostream.h>
2. #include<fstream.h>
3. #include<stdio.h>
4. #include<conio.h>
5. #include<stdlib.h>
6. #include<string.h>
SOURCE
CODE
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
class Employee //declaring class employee
{ private:
intcode; //data members
char name[40];
char post[20];
float salary;

public: //member functions


void read();
void display();
intgetEmpCode() //will return employee code
{ return code;
}

float getSalary() //will return employee salary


{ return salary;
}

void updateSalary(float s) //will update employee salary


{ salary = s;
}
void updatePost(char str[]) //will change post of an employee
{ strcpy(post,str);
}
};

void Employee::read() //Read employee record


{ cout<<"\nEnter employee code: ";
cin>>code;
cout<<"Enter name: ";
gets(name);
cout<<"Enter designation: ";
gets(post);
cout<<"Enter salary: ";
cin>>salary;
}
void Employee::display() //Display employee record
{
cout<<"\t"<<code<<"\t\t"<<name<<"\t"<<post<<"\t"<<salary<<"\n";

void welcome() //function for welcome screen


{ clrscr();
gotoxy(28,7);
cprintf("W E L C O M E T O");
gotoxy(25,9);
cprintf("EMPLOYEE MANAGEMENT SYSTEM");
gotoxy(32,12);
cprintf("COMPILED BY:");
gotoxy(32,13);
cprintf("SAKSHAM KUMAR");
gotoxy(35,14);
cprintf("XII A");
gotoxy(19,15);
cprintf("KENDRIYA VIDYALAYA JANAKPURI (FIRST SHIFT)");
gotoxy(24,19);
cprintf("*Press any Key for Main Menu*");
getch();
}

fstreamfile; //global declaration


void appendToFile() //function to append record into file
{ gotoxy(25,1);
cprintf("EMPLOYEE MANAGEMENT SYSTEM");

Employee x;
[Link](); //Read employee record from user
[Link]("[Link]",ios::binary|ios::app);
if(!file)
{ cout<<"\nERROR IN CREATING FILE\n";
return;
}
cout<<endl;
//write into file
[Link]((char*) &x,sizeof(x));
[Link]();
cout<<"Record added sucessfully \n";
}

void displayAll() //Display all records


{ gotoxy(25,1);
cprintf("EMPLOYEE MANAGEMENT SYSTEM");

Employee x;

[Link]("[Link]",ios::binary|ios::in);
if(!file)
{ cout<<"ERROR IN OPENING FILE \n";
return;
}
cout<<"\nEmpCode"<<"\tName"<<"\tDesignation"<<"\tSalary \n";
while(![Link]())
{ if([Link]((char*) &x,sizeof(x)))
[Link]();
}
[Link]();
}

void searchForRecord() //read employee id


{ gotoxy(25,1);
cprintf("EMPLOYEE MANAGEMENT SYSTEM");
Employee x;
intn;
int flag=0;

cout<<"\nEnter employee code: ";


cin>>n;

[Link]("[Link]",ios::binary|ios::in);
if(!file)
{ cout<<"ERROR IN OPENING FILE \n";
return;
}
while(![Link]())
{ if([Link]((char*) &x,sizeof(x)))
{ if([Link]()==n)
{cout<<"RECORD FOUND\n";
cout<<"EmpCode"<<"\tName"<<"\tDesignation"<<" \tSalary\n";
[Link]();
flag=1;
break;
}
}
}

if(flag==0)
{ cout<<"Record not found with employee code "<<n;
}
[Link]();
}

void increaseSalary() //Function to increase Salary


{ gotoxy(25,1);
cprintf("EMPLOYEE MANAGEMENT SYSTEM");
Employee x;
intn,flag=0;
float newsal, sal;
long pos;

cout<<"\nEnter Employee Code: ";


cin>>n;
[Link]("[Link]",ios::binary|ios::in|ios::out);
if(!file)
{ cout<<"ERROR IN OPENING FILE \n";
return;
} //Using File handling concepts
while(![Link]())
{ pos=[Link]();
[Link]((char*) &x,sizeof(x));
{ if([Link]()==n)
{ cout<<"Enter Salary hike: ";
cin>>sal;
newsal=[Link]() + sal;
[Link](newsal);
[Link](pos);
[Link]((char*) &x,sizeof(x));
flag=1;
break;
}
}
}
if(flag==1)
{ cout<<"\nNew Salary: "<<newsal;
cout<<"\nSalary Updated Successfully\n";
}
else
cout<<"Record not found with employee code "<<n;
[Link]();
}

void promotion() //To give new post to an employee


{ gotoxy(25,1);
cprintf("EMPLOYEE MANAGEMENT SYSTEM");
[Link]("[Link]",ios::binary|ios::in|ios::out);
if(!file)
{ cout<<"ERROR IN OPENING FILE \n";
return;
}

Employee x;
intn,flag=0;
char str[20];
long pos;
cout<<"\nEnter employee code: ";
cin>>n;

while(![Link]())
{ pos=[Link]();
[Link]((char*) &x,sizeof(x));
if([Link]()==n)
{ cout<<"Enter new post name: ";
gets(str);
[Link](str);
[Link](pos);
[Link]((char*) &x,sizeof(x));
flag=1;
break;
}
}
if(flag==1)
cout<<"Promotion done successfully \n";
else
cout<<"Record not found with employee code "<<n;
[Link]();
}

void delRecord() //delete an employee record


{ gotoxy(25,1);
cprintf("EMPLOYEE MANAGEMENT SYSTEM");

Employee x;
intn,flag=0;
cout<<"\nEnter employee code: ";
cin>>n;
fstream fin;
[Link]("[Link]",ios::binary|ios::in); //Input Mode
[Link]("[Link]",ios::binary|ios::out); //Write Mode

while([Link]((char*) &x, sizeof(x)))


{ if([Link]()!=n)
[Link]((char*) &x, sizeof(x));
else
flag=1;
}
[Link]();
[Link]();

if(flag==1)
cout<<"\nRecord Deleted Successfully";
else
cout<<"\nRecord not found with Emp Code "<<n;

remove("[Link]");
rename("[Link]","[Link]");
}

void main()
{ welcome();
clrscr();
char ch;

do
{ gotoxy(25,1);
cprintf("EMPLOYEE MANAGEMENT SYSTEM");
int n;
cout<<"\nPress 0 for exit \n"; //Menu for different operations
cout<<"[Link] AN EMPLOYEE \n";
cout<<"[Link] ALL \n";
cout<<"[Link] SPECIFIC \n";
cout<<"[Link] SALARY \n";
cout<<"[Link] \n";
cout<<"[Link] A RECORD \n";
cout<<"Make a choice: ";
cin>>n;

if(n==0)
exit(0);

else
{ clrscr();
switch(n) //different cases in menu driven program
{
case 1: appendToFile(); break;
case 2: displayAll(); break;
case 3: searchForRecord(); break;
case 4: increaseSalary(); break;
case 5: promotion(); break;
case 6: delRecord(); break;
default: cout<<"Invalid Choice\n";
}
}
cout<<"\n\nDo you want to continue? (Press Y/y to continue): ";
cin>>ch;
clrscr();
} while(ch=='Y'||ch=='y');
}

OUTPUT
SCREENS
WELCOME SCREEN
MAIN MENU
ADDING A NEW
EMPLOYEE
DISPLAYING ALL
RECORDS
SEARCHING A SPECIFIC
RECORD

INCREASING SALARY
UPDATED RECORDS

PROMOTION
UPDATED RECORD

DELETING A RECORD
UPDATED RECORD
WHEN A WRONG
INPUT IS GIVEN
WHEN A WRONG
EMPLOYEE CODE IS
GIVEN FOR OPERATIONS
BIBLIOGRAPHY
1. COMPUTER SCIENCE text book
By: SUMITA ARORA

2. Mr. AJAY GODWAL sir


(P.G.T. Comp. Science)

3. SHIV DAS question bank in C++.

4. K.V.S. Study Material for Computer Science

5. [Link]

Common questions

Powered by AI

File handling contributes to user interaction by providing functions to read from and write to files, thus supporting persistent data storage for employee records. This includes adding new records, updating existing ones, and removing records as needed, which are critical operations that permit continuous system use without losing data between sessions. The use of file streams facilitates efficient data persistence and retrieval, enhancing the user experience and system reliability .

The advantages of computerizing the Employee Management System include easier information retrieval, reduced error rates compared to manual systems, and increased efficiency in operations like employee addition, salary updates, and record deletion. The system also enables faster data processing and simplifies database maintenance and modification, thereby improving the overall administrative efficiency of the company .

Utilizing both input and output file streams is significant for maintaining employee records as it allows the system to both read existing records and append or modify new data effectively. Input streams enable data retrieval crucial for operations like search and display, while output streams facilitate the writing of changes and new entries, ensuring that all updates are saved persistently. This dual functionality is crucial for maintaining accurate and up-to-date records in the "Employee Management System" .

C++ is suitable for developing the "Employee Management System" because it is a simple, high-level language that supports object-oriented programming, which allows creating hierarchy-related objects. It offers features such as inheritance, polymorphism, and operator overloading, making programs easy to maintain and expand. Furthermore, its ability to operate close to machine-level details helps in building fast and efficient applications .

The main objectives of implementing the "Employee Management System" are to minimize manual work, increase the speed of work, and ease information retrieval. The system aims to computerize operations like adding employees, displaying employee lists, searching for employees, increasing salaries, promotions, and deleting records. It also aims to make maintenance and modifications of the database easy .

Header files enhance the functionality of the "Employee Management System" by providing pre-defined classes and functions that allow for efficient file handling, screen operations, and input/output management. They are incorporated in the project through the use of #include directives at the beginning of the source code to facilitate functions like file operations, string manipulations, and console I/O, which are critical to the system's operations. This modular approach simplifies coding and reduces errors .

Turbo C++ serves as a reliable development tool for the "Employee Management System" due to its widespread use, ease of mastery, and support for object-oriented programming. It provides a comprehensive development environment with features for building efficient and scalable applications. However, its limitations include potential lack of support for modern operating systems and graphical interfaces, which may restrict user experience and compatibility with new technologies .

C++ file handling functions facilitate the management of employee records by enabling permanent storage, retrieval, and modification of data. Functions like ifstream and ofstream allow reading and writing file contents, respectively. The program uses classes such as fstream to read and write employee data, making it easy to append, modify, or delete records. This ensures efficient management of employee records within the "Employee Management System" .

Object-oriented programming in C++ enhances the functionality of the "Employee Management System" by enabling the creation of classes that encapsulate employee data and related functions. This approach allows for modularization, reusability, and scalability of code. Features like inheritance and polymorphism allow for flexible and efficient data manipulation and system extensibility, which is crucial for managing a potentially large and evolving employee database .

Integrating database file management into the "Employee Management System" improves administration processes by allowing complex data operations like storing, updating, and retrieving employee information more efficiently. This integration reduces manual handling, minimizes errors, and provides a structured approach to record keeping, thereby enhancing data accuracy and integrity. Moreover, it facilitates quick access to records, allowing administrators to make informed decisions swiftly, thus streamlining operations and enabling scalability .

You might also like