100% found this document useful (1 vote)
59 views21 pages

DS Project Report

The document is a project report for an Employee Management System using a Doubly Linked List. It includes: 1) An introduction describing the project as a menu-driven program to perform CRUD operations on a doubly linked list of employee data including fields like name, ID, department etc. 2) Code snippets and pseudo-code for creating and manipulating the doubly linked list including functions for insertion, deletion, searching and displaying the employee records. 3) Sections on the implementation approach using a node struct to store employee data and manipulate the linked list by updating next and previous pointers on insertion and deletion.

Uploaded by

Ankita Pradhan
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
100% found this document useful (1 vote)
59 views21 pages

DS Project Report

The document is a project report for an Employee Management System using a Doubly Linked List. It includes: 1) An introduction describing the project as a menu-driven program to perform CRUD operations on a doubly linked list of employee data including fields like name, ID, department etc. 2) Code snippets and pseudo-code for creating and manipulating the doubly linked list including functions for insertion, deletion, searching and displaying the employee records. 3) Sections on the implementation approach using a node struct to store employee data and manipulate the linked list by updating next and previous pointers on insertion and deletion.

Uploaded by

Ankita Pradhan
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
You are on page 1/ 21

PROJECT REPORT

On

EMPLOYEE MANAGEMENT SYSTEM


USING DOUBLY LINKED LIST
Submitted to Centurion University of Technology& Management in
partial fulfillment of the requirement for award of the degree of

B. TECH.
in

COMPUTER SCIENCE & ENGINEERING

SUBMITTED BY

RASHMITA KU. PRADHAN – 210101120110

Under the Guidance of

Mr. ANSHUMAN PATTANAIK

DEPT. OF COMPUTER SCIENCE ENGINEERING

SCHOOL OF ENGINEERING &TECHNOLOGY,


CUTM, Paralakhemundi-761200

1
CERTIFICATE

This is to be certified that the minor project entitled “EMPLOYEE MANAGEMENT


SYSTEM USING DOUBLY LINKED LIST” has been submitted for the Bachelor of
Technology in Computer Science Engineering of School of Engineering &
Technology, CUTM, Paralakhemundi during the academic year 2021-2025 is a
persuasive piece of project work carried out by “RASHMITA KU. PRADHAN -
210101120110” towards the partial fulfillment for award of the degree (B.Tech.)
under the guidance of “Mr. ANSHUMAN PATTANAIK” and no part thereof has
been submitted by them for any degree to the best of my knowledge.

Signature of HOD Signature of Project Guide

Name of the HOD - Mr. DEBENDRA MAHARANA

Name of the Guide – Mr. ANSHUMAN PATTANAIK

2
EVALUATION SHEET

1. Title of the Project:


EMPLOYEE MANAGEMENT SYSTEM USING DOUBLY LINKED
LIST

2. Year of submission: 2022


Name of the degree: BTech(CSE)
Date of Examination / Viva: 24-11-22
Student Name with Reg No:

RASHMITA KU. PRADHAN - 210101120110

Name of the Guide: Mr. ANSHUMAN PATTANAIK

7. Result: [APPROVED/REJECTED]

Name of the HOD – Mr. Debendra Maharana

Name of the Guide – MR. ANUSHUMAN PATTANAIK

Signature of External Examiner

3
CANDIDATE’S DECLARATION

I “RASHMITA KU. PRADHAN - 210101120110” B. Tech in CSE (Semester-


III)
of School of Engineering &Technology, CUTM, Paralakhemundi, hereby
declare that the Project Report entitled “EMPLOYEE MANAGEMENT
SYSTEM USING DOUBLY LINKED LIST” is an original work and data
provided in the study is authentic one. This report has not been submitted
to any other Institute for the award of any other degree by me.

Signature of Student

4
ACKNOWLEDGEMENT

I would like to express my gratitude to my project guide Mr. ANSHUMAN


PATTANAIK for his able guidance and support to complete my project. I
would also extent my sincere thanks to Centurion University of Technology
and Management to provide the resources and extensions in my project.

STUDENT NAME & REGD NUMBER

RASHMITA KU. PRADHAN - 210101120110

5
ABSTRACT
Employees are the backbone of any company therefore their
management plays a major role in deciding the success of an
organization. Employees Management Software makes it easy for the
employer to keep track of all records. This software allows the
administrator to edit employees, add new employees,
transfer/promote/terminate employees. Each employee in the database
is associated with a position can be added and edited when need
arises. Employees can be transferred between positions easily without
having to retype back their information in the database. You can
check to see if there are duplicate positions/employees in the
database. Most of all, the employer can assign tasks to employees and
assess their progress in order to keep track of employee performance.
A flexible and easy to use Employee Management software solution
for small and medium sized companies provides modules for
personnel information management thereby organization and
companies are able to manage the crucial organization asset – people.

6
INTRODUCTION
This project is all about the Employee Management System using
Doubly Linked List. Employees Management Software makes it easy
for the employer to keep track of all records. This software allows the
administrator to edit employees, add new employees, transfer/promote
/Terminate employees by using the Doubly Linked List algorithm
which makes this easy. It examines theories, concepts, approaches,
methods and techniques relevant to the project. Similar existing
technologies relating to the development the EMS are discussed.

 What is Linked List?


A linked list is a linear data structure, in which the elements are not
stored at contiguous memory locations. The elements in a linked list
are linked using pointers as shown in the below image:

Doubly Linked:
As in the singly linked list, the doubly linked list also has a head and a
tail. The previous pointer of the head is set to NULL as this is the first
node. The next pointer of the tail node is set to NULL as this is the
last node.

A basic layout of the doubly linked list is shown in the below


diagram.

7
Declaration

Design and implement a menu-driven program in C for the below


operations on DLL of employee data with
fields: SSN, name, department, designation, Salary, Phone
Number:
 Create a DLL of N employee’s data by using end insertion.
 Display the status of DLL and count the number of nodes in
it.
 Perform insertion and deletion at end of DLL.
 Perform insertion and deletion at front of DLL.
 Demonstrate how this DLL can be used as a double-
ended queue.
Approach:
 For storing the data of the employee, create a user define
datatype which will store the information regarding
Employee. Below is the declaration of the data type:
struct node {
struct node* prev;
int ssn;
long int phno;

8
float sal;
char name[20], dept[10], desg[20];
struct node* next;
}
Building the Employee’s table: For building the employee table the
idea is to use the above struct datatype which will use to store the
information regarding the employee and every new employee’s
details will be added as a linked list node.
Deleting in the record: Since, a doubly-linked list is used to store
the data, therefore to delete the data at any index just link the next to
the next of the deleted data and link the previous node of the next
data of the deleted node to its previous data.
Searching in the record: For searching in the record based on any
parameter, the idea is to traverse the data and if at any index the
value parameters match with the record stored, print all the
information of that employee.

CODE
INPUT:
// C-program to demonstrate employer
// details using a Doubly-linked
list #include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

// Global
declaration int
count = 0;

// Structure
declaration struct
node {
struct node*
prev; int ssn;
long int phno;
float sal;
char name[20], dept[10],
desg[20]; struct node* next;
9
} * h, *temp, *temp1, *temp2, *temp4;

10
// Function to create node
void create()
{
int ssn;
long int phno;
float sal;
char name[20], dept[10], desg[20];
temp = (struct node*)malloc(sizeof(struct
node)); temp->prev = NULL;
temp->next = NULL;
printf("\n enter ssn, name,
depart" "ment, designation,
salary " "and phno of
employee:\n");
scanf("%d %s %s %s %f
%ld", &ssn, name, dept,
desg, &sal, &phno);
temp->ssn = ssn;
strcpy(temp->name, name);
strcpy(temp->dept, dept);
strcpy(temp->desg, desg);
temp->sal = sal;
temp->phno = phno;
count++;
}

// Function to insert at
beginning void insertbeg()
{
// If DLL is empty
if (h == NULL) {
create();
h=
temp;
temp1 = h;
}

// Else create a new node and


// update the links
else {
create();
temp->next =
h; h->prev =

11
temp; h = temp;
}

12
}

// Function to insert at
end void insertend()
{
// If DLL is empty
if (h == NULL) {
create();
h=
temp;
temp1 = h;
}

// Else create a new node and


// update the links
else {
create();
temp1->next =
temp; temp->prev =
temp1; temp1 =
temp;
}
}

// Function to display from


beginning void displaybeg()
{
temp2 = h;
if (temp2 == NULL) {
printf("\n list is empty\
n"); return;
}
printf("\n linked list elements
" "from beginning:\n");
while (temp2 != NULL) {
printf("%d %s %s %s %f %ld\
n",
temp2->ssn, temp2->name,
temp2->dept, temp2->desg,
temp2->sal, temp2->phno);
temp2 = temp2->next;
}

// Print the count

13
printf("number of employees=%d", count);
}

14
// Function to delete at
end int deleteend()
{
struct node*
temp; temp = h;
if (temp == NULL) {
printf("list is empty\
n"); return 0;
}
if (temp->next == NULL) {
printf("%d %s %s %s %f %ld\
n",
temp->ssn, temp->name,
temp->dept, temp->desg,
temp->sal, temp->phno);
free(temp);
h =
NULL;
}
else {
temp = temp1;
temp2 = temp1->prev;
temp2->next =
NULL;
printf("%d %s %s %s %f %ld\
n", temp->ssn, temp->name,
temp->dept, temp->desg,
temp->sal, temp->phno);
free(temp);
temp1 = temp2;
}
count--;
return 0;
}

// Function to delete from


beginning int deletebeg()
{
struct node*
temp; temp = h;
if (temp == NULL) {
printf("list is empty\
n"); return 0;
}

15
if (temp->next == NULL) {
printf("%d %s %s %s %f %ld\
n",
temp->ssn, temp->name,

16
temp->dept, temp->desg,
temp->sal, temp->phno);
free(temp);
h=
NULL;
}
else {
h = h->next;
h->prev = NULL;
printf("%d %s %s %s %f %ld\
n", temp->ssn, temp->name,
temp->dept, temp->desg,
temp->sal, temp->phno);
free(temp);
}
count--;
return 0;
}

// Function displaying
menus void
employerDetails()
{
int ch, n, i;
h=
NULL;
temp = temp1 = NULL;
printf("--------Menu-----------\n");
printf("\n 1.create a DLL of n
emp"); printf("\n 2.display from
beginning"); printf("\n 3.insert at
end");
printf("\n 4.delete at end");
printf("\n 5.insert at beginning");
printf("\n 6.delete at
beginning");
printf("\n 7.to show DLL as
queue"); printf("\n 8.exit\n");
printf("---------------------\n");
while (1) {
printf("\n enter choice :
"); scanf("%d", &ch);

// Switch statements

17
begins switch (ch) {
case 1:
printf("\n enter number
of" " employees:");
scanf("%d", &n);

18
for (i = 0; i < n; i++)
insertend();
break;
case 2:
displaybeg();
break;
case 3:
insertend();
break;
case 4:
deleteend();
break;
case 5:
insertbeg();
break;
case 6:
deletebeg();
break;
case 7:
printf(
"\n to show DLL as
queue" " \n1.perform
insert and"
" deletion operation by "
"calling insertbeg() and "
"deleteend() respectively\n "
"\t OR \n 2.perform insert "
"and delete operations by"
"calling insertend() and "
"deletebeg() respectively\n");
break;
case 8:
exit(0);
default:
printf("wrong choice\n");
}
}
}

// Driver Code
int main()
{
// Function Call
employerDetails();

19
return 0;
}
OUTPUT:

Explanation:
1. create():The create() function creates a doubly linked list node
using dynamic memory allocation i.e., using malloc() function. Data
inserted into it such as name, dept, designation, salary, Phno. into
temp node.
2. insertbeg(): This function is used for inserting the node at the
beginning of the doubly linked list. In this function,
if h==NULL means the list is completely empty so need to create a
new node. Otherwise, create a node and insert it at the beginning.
Then make this node a new temp node.
3. insertend(): This function is used for inserting the node at the end
of the doubly linked list. In this function, if h==NULL means the list
is completely empty so need to create a new node. Otherwise, insert
this temp after the temp1 node, lastly assign temp as temp1 for future
use.
4. displaybeg(): This function is used for displaying the elements of
the list from the beginning. It also helps to know the number of
employees.

20
5. deleteend(): This function is useful for deleting the node from the
end. Since memory is allocated dynamically for the node, need to
explicitly write the function to free the node that is done by
using free(temp).
6. deletebeg(): This function is useful for deleting the node from the
beginning Since the memory is allocated dynamically for the node,
need to explicitly write the function to free the node that is done by
using free(temp).
7. main(): This is the main function that drives the whole program.
It uses switch statements to operate all the functions which are
required to run a successful program.

21

You might also like