0% found this document useful (0 votes)
19 views12 pages

Chapter 2

Uploaded by

shakyaamit238
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)
19 views12 pages

Chapter 2

Uploaded by

shakyaamit238
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/ 12

Chapter 2

Implementation
* Introduction of language:
C programming is a structured programming language organized around
functions and modules and supports features such as loops, conditionals, and
pointers. It is also a compiled language, which means that programs written in
C are translated into language by a compiler before being executed.

IDE
C Online Compiler: Code, Compile, and Debug C Online. C is a
foundational and versatile programming language that has stood the test of
time. Its simplicity, coupled with its ability to create efficient code, makes it a
language of choice for system programming, embedded systems, and more.

Data structure (stack)


Stack is a linear data structure that follows LIFO (Last In First Out) Principle , so
the last element inserted is the first to be popped out. In this article, we will
cover all the basics of Stack, Operations on Stack, its implementation,
advantages, disadvantages which will help you solve all the problems based on
Stack.

Push:
* Before pushing the element to the stack, we check if the stack is full .
* If the stack is full (top == capacity-1) , then Stack Overflows and we cannot
insert the element to the stack.
* Otherwise, we increment the value of top by 1 (top = top + 1) and the new
value is inserted at top
position .
* The elements can be pushed into the stack till we reach the capacity of the
stack.

Pop:
* Before popping the element from the stack, we check if the stack is empty .
* If the stack is empty (top == -1), then Stack Underflows and we cannot
remove any element from the stack.
* Otherwise, we store the value at top, decrement the value of top by 1 (top =
top – 1) and return the stored top value.

Peek:
* Before returning the top element from the stack, we check if the stack is
empty.
* If the stack is empty (top == -1), we simply print “Stack is empty”.
* Otherwise, we return the element stored at index = top.
Chapter 3
Conclusion & future scope
Employee Management System (EMS) is a revolutionary tool that offers a
holistic approach to streamline administrative tasks, enhance communication,
and elevate productivity within organizations.
The utilization of employee management systems in workplaces is anticipated
to undergo substantial evolution and transformation in the coming years.
* Improved Communication Channels
* Data-Driven Decision-Making Processes
* Customization and Scalability Options
* Integration of Cutting-Edge Technologies
* Accessibility and Diversity Inclusion
* Adherence to Regulatory Requirements

Reference & bibliography


https://www.javatpoint.com/
https://www.geeksforgeeks.org
#include <stdio.h>
#include <string.h>
#define MAX 20

// Structure of Employee
typedef struct
{
char name[50];
long int code;
char designation[50];
int exp;
int age;
} employee;
int num;
void showMenu();
employee emp[MAX], tempemp[MAX],
sortemp[MAX], sortemp1[MAX];

// Function to build the given datatype


void build()
{
printf("Build The Table\n");
printf("Maximum Entries can be %d\n", MAX);
printf("Enter the number of Entries required");
scanf("%d", &num);
if (num > 20)
{
printf("Maximum number of Entries are 20\n");
num = 20;
}
printf("Enter the following data:\n");
for (int i = 0; i < num; i++)
{
printf("Name ");
scanf("%s", emp[i].name);

printf("Employee ID ");
scanf("%ld", &emp[i].code);

printf("Designation ");
scanf("%s", emp[i].designation);

printf("Experience ");
scanf("%d", &emp[i].exp);

printf("Age ");
scanf("%d", &emp[i].age);
}
showMenu();
}

// Function to insert the data into

void insert()
{
if (num < MAX)
{
int i = num;
num++;

printf("Enter the information of the Employee\n");


printf("Name ");
scanf("%s", emp[i].name);

printf("Employee ID ");
scanf("%ld", &emp[i].code);

printf("Designation ");
scanf("%s", emp[i].designation);

printf("Experience ");
scanf("%d", &emp[i].exp);
printf("Age ");
scanf("%d", &emp[i].age);
}
else
{
printf("Employee Table Full\n");
}
showMenu();
}

// Function to delete record at index i


void deleteIndex(int i)
{
for (int j = i; j < num - 1; j++)
{
strcpy(emp[j].name, emp[j + 1].name);
emp[j].code = emp[j + 1].code;
strcpy(emp[j].designation, emp[j + 1].designation);
emp[j].exp = emp[j + 1].exp;
emp[j].age = emp[j + 1].age;
}
return;
}
// Function to delete record
void deleteRecord()
{
printf("Enter the Employee ID to Delete Record");

long int code;

scanf("%ld", &code);
for (int i = 0; i < num; i++)
{
if (emp[i].code == code)
{
deleteIndex(i);
num--;
break;
}
}
showMenu();
}
void searchRecord()
{
printf("Enter the Employee ID to Search Record");

long int code;


scanf("%ld", &code);
for (int i = 0; i < num; i++)
{
if (emp[i].code == code)
{
printf("Name %s\n", emp[i].name);

printf("Employee ID %ld\n", emp[i].code);

printf("Designation %s\n", emp[i].designation);

printf("Experience %d\n", emp[i].exp);

printf("Age %d\n", emp[i].age);


break;
}
}
showMenu();
}

// Function to show menu


void showMenu()
{
printf("Available Options:\n\n");
printf("Build Table (1)\n");
printf("Insert New Entry (2)\n");
printf("Delete Entry (3)\n");
printf("Search a Record (4)\n");
printf("Exit (5)\n");

int option;
scanf("%d", &option);
if (option == 1)
{
build();
}
else if (option == 2)
{
insert();
}
else if (option == 3)
{
deleteRecord();
}
else if (option == 4)
{
searchRecord();
}
else if (option == 5)
{
return;
}
else
{
printf("Expected Options are 1/2/3/4/5");
showMenu();
}
}

int main()
{
showMenu();
return 0;
}
Chapter 1
Introduction of Employee Management System
Employee management systems (EMS) are software applications designed to streamline
workforce operations and enhance organizational efficiency. EMS can effectively track
employee information, manage attendance, evaluate performance, and facilitate
communication between managers and staff members.

Project Category
Introduction: Employee management systems (EMS) are software applications aimed at
optimizing workforce operations and improving overall organizational performance.

Objectives
1. Efficient Workforce Management
2. Accurate Employee Documentation
3. Seamless Communication
4. Resource Allocation Optimization

Problem Formulation
Challenges in employee management highlighted in this report include issues related to
team collaboration, performance evaluation, absence tracking, and lack of efficient
communication channels between employees and management.

Identification/Recognition of Need
Efficient employee management is vital for organizational success. Employee management
software simplifies tasks such as scheduling, performance evaluation, leave management,
and payroll processing. EMS empowers managers with valuable insights into employee
performance, identifies areas for improvement, and facilitates data-driven decision-making
to boost productivity.

Unique Features
* Employee Onboarding & Training
* Shift Scheduling & Attendance Tracking
* Performance Evaluation & Feedback
* Employee Self-Service Portal

You might also like